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 Filter Query on ...
Power Automate
Unanswered

OData Filter Query on Dataverse Formula Column

(0) ShareShare
ReportReport
Posted on by

I am working on a Power Automate flow that uses an OData style filter expression to filter a Dataverse table and return the results in a CSV file.  The filter parameters are selected in a Canvas App and when the user selects the "Export" button, it should export to a CSV through a Power Automate flow.  I have three tables in my solution:

 

  • States and Regions
    • State Abbreviation (Primary)
  • Contracts
    • Contract Name (Primary)
    • State Abbreviation (Lookup to States and Regions)
  • On Contract Pricing
    • Contract Name (Lookup to Contracts)
    • State Abbreviation
      • This is an fx column type that pulls the State Abbreviation from the Contracts table. 
      • The fx expression for the column is 'Contract Name'.State.'State Abbreviation'
 

The user has the option to filter by either: State Abbreviation or Contract Name.  I have figured out the OData filter syntax for the "Contract Name" column which is:

 

pre_ContractName/pre_contractname eq 'INPUT CONTRACT NAME'

 

However I can't seem to figure out the syntax to filter for the State Abbreviation.  I believe this has to do with the column type being a formula/fx column. I've tried many options including:

 

_pre_stateabbreviation_value eq "INPUT STATE ABBREVIATION"

_pre_StateAbbreviation_value eq "INSERT STATE ABBREVIATION"

_pre_stateabbreviation_value/njs_stateabbreviation eq "INSERT STATE ABBREVIATION"

 

The column name on my "On Contract Pricing" table is "pre_stateabbreviation".  When I look at the output from a successful flow using the Contract Name, I can see that the State Abbreviation column output looks different than the Lookup column types. 

 

LOOKUP COLUMN OUTPUT:

 "_pre_contractname_value@OData.Community.Display.V1.FormattedValue": "Example City",
 "_pre_contractname_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "pre_ContractName",
 "_pre_contractname_value@Microsoft.Dynamics.CRM.lookuplogicalname": "pre_contracts",
 "_pre_contractname_value@odata.type": "#Guid",
 "_pre_contractname_value": "48fbf5d1-fde6-ee11-904d-000d3a5c4b80",

 

fx/FORMULA COLUMN OUTPUT:

 "@odata.type": "#Microsoft.Dynamics.CRM.pre_oncontractpricing",
 "@odata.id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/pre_oncontractpricings(8b4ac085-b8e7-ee11-904d-000d3a5c4875)",
 "@odata.etag": "W/\"91734574\"",
 "@odata.editLink": "pre_oncontractpricings(8b4ax085-b8e7-ef11-904d-000d3a5c5175)",
 "pre_stateabbreviation": "TX",

 

So my question is - how the heck do I write my OData filter syntax for the formula/fx column type?  

 

Fingers crossed!

Categories:
I have the same question (0)

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
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 822

#3
Haque Profile Picture

Haque 482

Last 30 days Overall leaderboard