web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / ODATA List Rows filter...
Power Automate
Unanswered

ODATA List Rows filter query of Dataverse table help please

(0) ShareShare
ReportReport
Posted on by

I have been wrestling with crafting a query that works. The Flow must accept the field data coming from a button-triggered Flow in a Canvas app--the "FILTERS" panel on the right of the pic.

Surely the "Filter rows" ODATA is able to manage so complex a query. So, it must be my inexperience. Can someone help please?

ChrisChong_1-1689478264195.png

Chris

Categories:
I have the same question (0)
  • GdarmonAbra Profile Picture
    77 on at

    using Odata filters in Power automate should look like this

    for string:

    fieldName Operation 'Value'

    for int:

    fieldName Operation numericValue

     

    List Of Operations

    GdarmonAbra_0-1689488660190.png

     

  • Linn Zaw Win Profile Picture
    2,996 on at

    @ChrisChong 

    Filtering with a fixed number of parameters is not complex. You can use contains operator for searching for a substring, eq operator for exact match, single quotes around string values, etc.

    contains(cra31_lastname, 'David') and cra31_region eq 60100012

    But it can get complicated if the search parameter is dynamic and if you need to build your filter rows parameter only based on the Filters entered by the user. (e.g. the user enters Facility, Last Name and Region but leaves the other filters empty).

    In that case, I recommend using Compose steps to build your Filter Rows parameter first.

    In the example below, the following expression concatenates the Facility, City, Last Name and Region field names with the parameter values if the parameter value is not null.

    concat
    (
    	if
    	(
    		equals(triggerBody()?['text'], null),
    		'',
    		concat
    		(
    			'contains(cra31_facility, ''',
    			triggerBody()['text'],
    			''') and '
    		)
    	),
    	if
    	(
    		equals(triggerBody()?['text_1'], null),
    		'',
    		concat
    		(
    			'contains(cra31_city, ''',
    			triggerBody()['text_1'],
    			''') and '
    		)
    	),
    	if
    	(
    		equals(triggerBody()?['text_2'], null),
    		'',
    		concat
    		(
    			'contains(cra31_lastname, ''',
    			triggerBody()['text_2'],
    			''') and '
    		)
    	),
    	if
    	(
    		equals(triggerBody()?['text_3'], null),
    		'',
    		concat
    		(
    			'cra31_region eq ',
    			triggerBody()['text_3'],
    			' and '
    		)
    	)
    )

     

    The expression above will have an extra " and " at the end, so you might need another Compose step to truncate the last x5 characters.

    if
    (
     empty(outputs('Compose')),
     '',
     substring(outputs('Compose'),0,sub(length(outputs('Compose')),5))
    )

     

    The end result will look something like this. (Facility, Last Name and Region values were entered but the City was empty).

    contains(cra31_facility, 'Power') and contains(cra31_lastname, 'David') and cra31_region eq 60100012

    LinnZawWin_0-1689637901812.png

     

     

     

  • ChrisChong Profile Picture
    on at

    Thank you. I think I can follow the concept in your suggestion. As you say, it gets complicated because the "Filter rows" search parameters are supplied dynamically. I will give it a go using the "Compose" step. I may be back if stuck. I hope you don't mind. I appreciate your patient response.

    Chris

  • Linn Zaw Win Profile Picture
    2,996 on at

    @ChrisChong 

    How did it go with using the "Compose" step? Feel free to let me know if you get stuck with your solution.

     

     

     

  • ChrisChong Profile Picture
    on at

    Unfortunately, I've not implemented your ideas yet--just the crush of other work. This week, I get back to it.

    Thanks for your interest.

    Chris

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard