cancel
Showing results for 
Search instead for 
Did you mean: 

Collection manipulation - Filtering with a data item

Jan_LouisMoster
Level 3
How would you filter a collection for a value in a data item? for example I use collection manipulation with the action "Filter collection" I can filter if I have a set value e.g "[Collectionfield]='12345'" but when I try and filter from a data item "[Collectionfield]=[dataitem]" blue prism tells me that it cannot find "[dataitem]" in the collection. How do I distinguish between a field in a collection and a data item while filtering the collection?
3 REPLIES 3

polinenileela_b
Level 4
Hi, U mean u have a collection and want to extract particular column items in to new collection ? If in that case u can use Filter Collection Action , Then u have to put the collection u want to filter in the collection In and the Filter Text : ""Column name u want to filter ='""&Column name from the collection&""'"" Hope it helps Thanks

John__Carter
Staff
Staff
I think you've confused the square brackets in the filter expression with the square brackets in the BP expression. It should be something like this: ""[First Name] = '"" & [dataitem] & ""'"" So that the result of this BP expression is a filter expression like this: [First Name] = 'John'

Jan_LouisMoster
Level 3
Thank you John and Leela, your solution worked