cancel
Showing results for 
Search instead for 
Did you mean: 

Filter a Collection

DiogoDavid
Level 3
Hi everyone, I am having trouble using the "filter collection" action in the Utility Collection Manipulation. I have a collection named "Data" and 3 columns ("A", "B", "C"). Each of these columns have values "1", "2", and "3". I want to filter the collection "Data", column "B", to have only values "2". Hence, what I do is an action, using the utility collection manipulation -> filter collection. The inputs of that action are: 1) Collection In: I choose the collection "Data" 2) Filter: Here is where I am having trouble. I tried [Data.B]="2" and even though BluePrism does not recognize any error, the output remains empty. Can someone please help me? Thank you so much in advance. Kind regards
12 REPLIES 12

KirankumarMahan
Level 4
Use expression ""B='2'"" to get the filter output refer the thread https://portal.blueprism.com/managing-collection-data-items

Thank you for your feeddback. I tried ""B='2'"", and it worked: But when I try the same with the field ""B C"", it doesn´t: ""Internal: Could not execute code stage because exception thrown by code stage: syntax error: missing operand after 'C' operator. Thank you so much

Thank you for your feeddback. I tried ""B='2'"", and it worked: But when I try the same with the field ""B C"", it doesn´t: ""Internal: Could not execute code stage because exception thrown by code stage: syntax error: missing operand after 'C' operator. Thank you so much

KirankumarMahan
Level 4
Hi David, Could you please explain this statement ""I try the same with the field ""B C"","" little clear so that I can help you to resolve your issue. And also please do refer the thread which I mentioned in my last comment. Thanks, Kiran

DiogoDavid
Level 3
Hi Kirankumar! Your solution worked fine. Thank you. However, when the field has two words (eg: ""Product Code""), when I try to filter (""Product Code='2'""), the following error occurs: ""Internal: Could not execute code stage because exception thrown by code stage: syntax error: missing operand after 'code' operator. Thanks in advance

KirankumarMahan
Level 4
Hi David, Good observation!! I have also tried I am getting the same error. But I have tried with removing the space between product and code it is working. lets raise this issue as fresh issue to our BP forum. Thanks kiran

DiogoDavid
Level 3
OK Thank you so much for your help

DiogoDavid
Level 3
OK Thank you so much for your help

KirankumarMahan
Level 4
Your most welcome david