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 / Referring to a dataver...
Power Automate
Unanswered

Referring to a dataverse choice column

(0) ShareShare
ReportReport
Posted on by 27

I'm trying to used List rows to get the active rows in a Dataverse table, therefore I tried the following filter expression:

statecode eq 'Active'.

 

It was without surprise that I got this error message:

"A binary operator with incompatible types was detected. Found operand types 'Edm.Int32' and 'Edm.String' for operator kind 'Equal'."

 

In fact, choice values can not be referred to as strings, but as integers instead.

Being unable to find a document explaining how choice values are numbered, I throw a guess that those start from 0 and I could get my active rows with "statecode eq 0".

 

My question is: is this the only way to refer to choice values?

I've tried "statecode eq Active" but then "Active" is interpreted as a non-existing column.

I suppose that this has something to do with multilingual feature, but referring to choices as ints is far from intuitive and highly cumbersome regarding to maintenance ☹️.

Categories:
  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @jose_farinha

     

    Please use

    statecode eq 0

     

  • jose_farinha Profile Picture
    27 on at

    Thanks, Mira. That's what I had done. However, my question is whether I can specify the same condition in another way, one that doesn't use the internal number of the choice value. I prefer to have it dependent on Active.  

  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @jose_farinha 

    Currently you can't use the display name in Row Filters but a nice trick is to use Advanced find to do your conditions then use Download FetchXML and then you can detect the values of the option set values from there

     <filter type="and">
     <condition attribute="statecode" operator="eq" value="0" />
     </filter>

     Hope this gives you an idea how you can approach such conditions.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard