cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Treadmill
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
manuelstgomes
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
manuelstgomes
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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (52,726)