Hot answers tagged

9

There is a special element which is intended for use with multiple lookup fields: http://msdn.microsoft.com/en-us/library/ff630172.aspx Includes Element (Query) If the specified field is a Lookup field that allows multiple values, specifies that the Value element is included in the list item for the field that is specified by the FieldRef ...


6

I'm hoping your question was for a multi-select choice field, where the entries are simply text, not referring items in another list. I was able to guess the answer from this microsoft article If you look under the ListItemCollection resource for "POST request example: Create list item" they show the following: method: "POST", body: "{ '__metadata': { ...


4

You can set a MultiValue Managed Metadata field by creating a TaxonomyFieldValueCollection and add this collection to the field by using the SetFieldValue method. First get the managed metadata field A possible way ( there are more ways ) to do this is to get the field by id $field = $item.Fields | ? {$_.Id -eq $fieldId} $tf = ...


3

Don't forget to put "Id" at the end of your column name. For example: if your column name is 'AssignedTo' you have to put 'AssignedToId' Also make sure the ID's you are providing in the "results" array are int's and not strings.


3

As far as I know, you can not use &. You have to use and or or inside the filter. So try using something like that: /_api/web/lists/getbytitle('Students')/items?$select=Title,ZIP&$filter=((ZIP eq 12345) or (ZIP eq 22222)) I always use brackets because of the readability, but you can also use it without brackets. ...


3

here's a code fragment that's similar but 'list.Items.Add() & item.Update()' are missing from your code SPList list = SPContext.Current.Web.Lists["testlist"]; SPListItem item = list.Items.Add(); SPFieldLookupValueCollection fieldValues = new SPFieldLookupValueCollection(); fieldValues.Add (new SPFieldLookupValue(1, "SomeValue1")); // add other ...


3

Unfortunately, Patrick, I don't think there is a way around this with your current design. The only possible solution I could think of would be to make your categories field "Multiple Lines of Text" but then you lose your lookup ability. Since there are so many categories that are being applied to a document, I wonder if tagging would be a good approach ...


3

I believe it is possible by setting the "UnlimitedLengthInDocumentLibrary" attribute to True. I ran into the same issue recently and after setting that attribute to True, I did not get the error any more.


3

I did not understand what is "multiple value lookup column from another field". I understood, also having consulted your previous question, that you want Multiple-Selection List Box on lookup field. It works for me. If you want help in particular problem, you should provide more details and in more clear terms how to reproduce it. Having created and ...


2

I would go for NO, not actually possible unless you build your own custom field to merge from 2 lists and display the Union/Intersection of values with appropriate storage of data. Even so, you would have to deal with storing the lookup value (ID#Value) combination which could also generate improper lookup due to duplicates. There is another way to merge ...


2

Update: I believe I answered 2 questions: the question in the title: "Can an InfoPath 2010 dropdown be populated by a SP List column with multiple choice values?" A: impossible in its original formulation "I have a list with a column that accepts multiple values (a "choice" type with checkboxes) and wish to display the same available choice options ...


2

Lookup fields (which user extends) supports AllowMultipleValues. Then you can do: var multi = field is SPFieldMultiChoice || (field is SPFieldLookup && (field as SPFieldLookup).AllowMultipleValues); Same for Taxonomy


2

Without fully knowing your list data structure, I'm thinking your query string should be formatted along the lines of : <Where> <Or> <Contains> <FieldRef Name='SeriousHarmQ1' /> <Value Type='MultiChoice'>Loss of consciousness</Value> </Contains> ...


2

I ran into this before and came up with a solution that is not as clean as one would have hoped, but it worked for me, granted that it's a dirty trick/workaround and it's far from being perfect. I tested it in SharePoint 2010, but from what I can see from your description, nothing has changed in SharePoint 2013 (read: dealing with multiselection box in ...


1

In SharePoint Designer, when you pick the column you want from the current item, there should be three drop-down boxes. The bottom one should be "Return field as:" and you can choose to return the Lookup IDs or the Lookup Values. If that doesn't work, another option is to modify your lookup column so that it includes additional columns from the source list. ...


1

I see what you are trying to do but there is an easier way than using Linq: if(item["Adminbrukere"] != null) { string [] choices = item["Adminbrukere"].ToString().Split(new string[] { ";#" }, StringSplitOptions.RemoveEmptyEntries); for (int i= 0; i < choices.Count(); i++) { string choice = choices[i].ToString(); } }


1

REST will (by default) only supply you with a link-tag to the "Adminbrukere"-list. You will have to expand the link of the lookup content with the following in order to be able to access the nested data. AddQueryOption("$expand", "Adminbrukere")" The resulting query will be something like the following: IEnumerable<BrukereItem> result = null; ...


1

Do your InfoPath form controls for the lookup columns still exist as "multiple-selection" boxes instead of "list" boxes? This is what the part of the error that says "You may need to add or modify your form view to add or remove the updated fields" refers to.


1

What you're looking for is a Filtered Drop-Down. SPServices, a free library on codeplex, has this functionality built in. Here's a link: http://spservices.codeplex.com/wikipage?title=%24().SPServices.SPFilterDropdown


1

Its should be $select=Collaborators/Title&$expand=Collaborators Example your URL should like http://yoursite/_api/web/lists/GetByTitle('Employee Details')/items("1")?$select=ManagerName/Title,FirstName,LastName,Position,Phone,Fax,PreviousCompany,Reference,BirthDate,Relocate,EmailAddress&$expand=ManagerName


1

There is no specific class for storing choice field value like in case of, for example, user field value in CSOM API. Since multiple choice field value is stored in string array, the following example demonstrates how to retrieve it: var list = ctx.Web.Lists.GetByTitle(listTitle); var listItem = list.GetItemById(itemId); ctx.Load(listItem); ...


1

By using code from How to build a CAML query with several nested OR's using a loop and its answser http://sharepoint.stackexchange.com/a/167266/35604, you can easily simplify your code. Now you have all these methods that help you building nested Or and And queries, simply do this: List<string> queries = new List<string>(); if ...


1

For a given dev team or individual developer you can retireve all the projects that they are associated with. Assuming a 2007 version: To do this you can put some javascript in a Content Editor Web Part on the forms that you want to use to trigger the workflow. The js code would use the GetListItems operation of the Lists.asmx web service to retrieve all ...


1

I think the content type hub is a red herring here - I suspect you have an index set on one of those altered columns. Go to List settings for the lists affected and click "Indexed Columns" below the Columns section. Find the offending indexes and remove them. Then create a new template and try to spin up a new site with the new template.


1

Your Query is right.. problem is something else.. I tried it in my environment it is working fine.. try it by using CAML Builder.. it will show you result of you query also.. <Where> <IsNull> <FieldRef Name='DestinationColumn' /> </IsNull> </Where>


1

I don't know a solution just a workaround: create a yes/no question for each selectable option so you can count 'yes' answers on those at the results page.


1

AFAIK there is no out of the box solution for this. But with this solution and adjusted refiners you can get what you want: http://sprefiner.codeplex.com/


1

I have met a similar requirement in the past with a term set. Allow users to set keywords on the documents and then show all documents with the keyword in the PageFieldValue. Note that this will only work with multi-value keywords if your CQWP selects from a single library - though you can use a single-value keyword from multiple libraries.


1

OOB SharePoint 2010 does not have multi-value refiners. I know of a codeplex project with multi-value refiners but haven't tested it, but you might want to give it a shot. In short it splits the string, eg. red;yellow;blue, and look at it as seperate values. I can't see why this shouldn't work for BCS fields either. Here is a description of how to ...


1

Unfortunately REST api doesn't support this. One of the solutions would be to use SharePoint Batch API and send ajax request to Lists.asmx web service. It's possible to add/update/delete several items in one request through Batch API. Here is how it might look like: var batchCommandXml = '<?xml version="1.0" encoding="utf-8"?> \ <soap:Envelope ...



Only top voted, non community-wiki answers of a minimum length are eligible