Select return type when using CAML query

  • 27 June 2018
  • 5 replies
  • 50 views

Badge +1

I have a site with a list where one column is defined as lookup with multiple values.

Now I’m trying to query an item/column from this list from another site.

As the list and the workflow is not in the same site I’m using CAML query.

I would like to be able to select return type (Lookup Value as Text, Comma Delimited).

How can this be done in a CAML query?

Alternative: How can I format the result to plain text (without the list id and ;#) after the query-list?

 

 


5 replies

Userlevel 5
Badge +14

you cannot influence this with CAML, CAML always returns raw data from sharepoint.

save resultset into a collection and then parse/handle it accordingly

Badge +1

Thank you for your answer but it didn’t help.
I do save the resultset into a collection. Subsequently, I perform a collection operation: Exists.

But this results in a not correct answer regarding if the variable can be found in the collection.

I’m sure it is because the collection doesn’t contain just values but also ID’s.

 

If I instead call a web service “GetListItems” I receive a more correct result: [Id];#”Value”;# [Id];#”Value”
Then I think I should use the “Query XML” action to get only the values and not the ID's but this doesn’t really work:

 

Userlevel 5
Badge +14

I'm not sure what're trying to do...

above you've asked how to get singe lookup (text) values out of multiselect lookup field, which I advised possible approach for.

now you seem to search for something specific within the collection or within the selected lookup options. but I'm totally out of picture what you're searching for.

Badge +1

I just need to check if a value X is existing in a column in a list on another site which is defines as ”lookup” with multiple values.

Userlevel 5
Badge +14

then I'd define directly CAML to return just items that have selected specific value 'X' among lookup options and didn't complicated things with filtering in workflow

216816_pastedImage_4.png

216815_pastedImage_3.png

Reply