I am running into this issue in my Filter query:
')' or ',' expected at position 26 in 'contains(cr079_name,'Lowe's Companies Inc')'.
I am trying to get rows based on this filter query: "contains(cr079_name,'@{items('For_each_Report_Details')?['cr079_entityname']}')"
I also have this action wrapped with an "apply for each" action. The overall aim is to filter that list so I can do something with it.
Any helps?
Looks a bit crazy, but this should do it:
(contains(cr079_name,' @{replace(if(equals(items('For_each_Report_Details')?['cr079_entityname'], null), '', items('For_each_Report_Details')?['cr079_entityname']),'''','''''')}' )) OR (cr079_ticketsymbol eq '@{replace(if(equals(items('For_each_Report_Details')?['cr079_ticketsymbol'], null), '', items('For_each_Report_Details')?['cr079_ticketsymbol']),'''','''''')}')
This is what it looks like now
(contains(cr079_name,' @{replace(items('For_each_Report_Details')?['cr079_entityname'],'''','''''')}' )) OR (cr079_ticketsymbol eq '@{replace(items('For_each_Report_Details')?['cr079_ticketsymbol'],'''','''''')}')
Then you are going to have to do an even more elaborate expression to replace the null with an empty string. Can you paste me the expression you used and I will rewrite it for you.
It seems to work. thank you but now I am running into the problem:
One or more fields provided is of type 'Null', a different type is expected.
What do you mean? Replace the contain function with the replace function?
I think you are going to have to do something like this:
replace(items('For_each_Report_Details')?['cr079_entityname'],'''','''''')
in your filter rows action.
It would appear that the "Entity" name contains a single quote which is being interpreted in the filter query, and therefore making the syntax incorrect.
I'm not sure of the solution, you might have to URLEncode the single quote or replace it with \' or perhaps double quotes. But that is what is causing your problem.
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2