How to ignore the case in blue prism,

For example : I am looking for a particular text in an collection, Collection of item gets populated from an application, sometimes I am getting like :
1. Location 2. LOCATION 3. location

And also please suggest what is the alternate function for "contains" like in any other language..
 

VJR

Well-Known Member
Hi VinayMurthy

Is this what you are referring to?
Use "Name LIKE '*location*'" in the Filter criteria while filtering the collection.
Name is the name of the collection column.
 
I am getting a list of File names in an collection, And I want to delete the files, if its name contains location in it.. I have attached an moc data of the collection :
 

Attachments

  • Locationtxt.PNG
    17.3 KB · Views: 84

VJR

Well-Known Member
I am getting a list of File names in an collection, And I want to delete the files, if its name contains location in it.. I have attached an moc data of the collection :
Hi VinayMurthy,

Would you want to delete the files from their disk location OR from this collection?
Both will have different approaches so post back your inputs.

If you want to delete the files from disk are they all belonging to the same folder?
 
Actually, I am deleting those files from an web app, I have already designed 2 actions which will select and delete those files based on value I pass on the value field, which I made dynamic when I spy that element in Application modular. Soo now I have to pass the value only if it contains Locations..
 

VJR

Well-Known Member
Actually, I am deleting those files from an web app, I have already designed 2 actions which will select and delete those files based on value I pass on the value field, which I made dynamic when I spy that element in Application modular. Soo now I have to pass the value only if it contains Locations..
Did you check the above filter condition which returns an output collection with only those rows that have location in them?
 
Yeap, its working... Could you please explain bit more on how did you framed this : "Name LIKE '*location*'" and any reference material to learn more on this kind.. Thanks ~VJ
 

VJR

Well-Known Member
Yeap, its working... Could you please explain bit more on how did you framed this : "Name LIKE '*location*'" and any reference material to learn more on this kind.. Thanks ~VJ
A general condition to use in the filter criteria is "Name = 'Pass'". This will filter all records where the value is Pass in the column called Name. If you look at the code of the Filter collection action it is filtering a collection based on the filter criteria that was passed as a parameter. Collections are datatables in .net. If you do a websearch on how to filter a datatable you will come across different selection criteria and operators that can be used.
 

to_mas_re

New Member
This worked for me.

Duplicate action "Filter Collection" and add this line to code (in line 4; before For loop) "Collection_In.CaseSensitive= false".

Example: with filter [column]='abc' you will get everything from items "abc","Abc","aBc","abC","ABc","AbC","aBC","ABC".
 
Top