filter data having Single quote

sharmil09

New Member
Hi All,

I am working on a project where I need to use filter in collection manipulation. I need to pass Data (coming through other collection) and filter data through other collection with given input.

Collection A has Case ID, Name and Subject.

Collection B has Name and Email ID and other details.

Now I get Name from collection A and filter it in B. Below is the syntax I have used:

"[Name]= "&[CollA.Name]&""

This was working fine. I got one name as Kat O'Reill. So bot is throwing an error of having single quote in name. I tried by putting single quotes in formula shared above but single quote will still exist and bot is unable to fetch data. If I remove single quote then BOT runs but it fetches no data. For normal scenario without having single quote, bot runs correctly.

Any suggestion for this problem?
 

Ashutosh_Rai

New Member
Please try this below mention Hope this works
"[Name] = '" &[CollA.Name]& "'"
"[Name] = '" &"Value"& "'"
 
Last edited:

sahil_raina_91

Active Member
Hi All,

I am working on a project where I need to use filter in collection manipulation. I need to pass Data (coming through other collection) and filter data through other collection with given input.

Collection A has Case ID, Name and Subject.

Collection B has Name and Email ID and other details.

Now I get Name from collection A and filter it in B. Below is the syntax I have used:

"[Name]= "&[CollA.Name]&""

This was working fine. I got one name as Kat O'Reill. So bot is throwing an error of having single quote in name. I tried by putting single quotes in formula shared above but single quote will still exist and bot is unable to fetch data. If I remove single quote then BOT runs but it fetches no data. For normal scenario without having single quote, bot runs correctly.

Any suggestion for this problem?

You will have to escape the ' character appearing in name by adding another '
Kat O'Reill becomes Kat O''Reill (Notice '')

Filter Query should look like this : [Name] = 'Kat O''Reill'

Put a decision to check if the name contains '
If yes, replace ' with ''
 

prabhaprabha

New Member
You will have to escape the ' character appearing in name by adding another '
Kat O'Reill becomes Kat O''Reill (Notice '')

Filter Query should look like this : [Name] = 'Kat O''Reill'

Put a decision to check if the name contains '
If yes, replace ' with ''

thanks for the above solution but i need work on the query [InvoiceNumber]='445074683/Mar '22'AND [Purchase Order Number]='4501317746'AND [VendorName]='Spark New Zealand Trading LimitedBilling & Payments'

[InvoiceNumber]=445074683/Mar '22 here as per your request we can filter but second if we check this for filter as we have 445074683/Mar "'22
in the collection A bot B will failed to filter due to name mismatch

kindly help me any another way we have to resolve this
 
Top