cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Common Data Service OData Filter with a runtime variable

Hi,

 

I have built a flow, which is triggered by an arrived Email. I extract the last name, first name and E-mail from the body of the E-mail through html to text function. My variable values are "clean" without spaces.

 

I try to list the contacts based on the last name (or E-Mail).

 

CDS List records OData filter works, if I write a static query: lastname eq 'Smith'

 

The filter does not seem to work with a variable:

Treadmill_1-1595413196259.png

I get an error, which seems to point out that a property is not existing and it's not looking for the property value:

Could not find a property named 'Smith' on type 'Microsoft.Dynamics.CRM.contact'.

 

I also tried to build the filter with the compose function and it does not work.

 

Treadmill_0-1595413032938.png

Is there a way in CDS to filter with a runtime variable?

 

Thank you already in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

HI @Treadmill 

 

You need to add ' around the variable to make it a string so that the comparison is possible.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

1 REPLY 1
Super User II
Super User II

HI @Treadmill 

 

You need to add ' around the variable to make it a string so that the comparison is possible.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (6,328)