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 Apps / Dataverse Choices Field
Power Apps
Answered

Dataverse Choices Field

(0) ShareShare
ReportReport
Posted on by 1,302

Hi

 

I have a DataVerse table called JukeBoxJuryMembers which has a Choices field called Colours with values "WHITE", "BLACK" and "RED".

 

I want to add a record  to this table. I use "RED" for the Colours field but I get an error "The runtime value "RED" to be converted doesn't have the expected format 'Integer/int32'.

 

So I try and get the equivalent integer value for the Colour "RED" by querying the table String maps with the filter attributename eq 'Colours' and value eq 'RED' and objecttypecode eq 'jukeboxjurymembers'.

 

I get an error The entity with a name  = 'jukeboxjurymembers' with namemapping = 'Logical' was not found in the MetadataCache.

 

What am I doing wrong ?

 

Thanks

 

Nigel

I have the same question (0)
  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @NigelP ,

     

    Do you want to patch a new record in Dataverse table with choice column is "RED"?

    You can either show me the code which is reporting an error, or you can try this code first.

     

    Patch(DataverseTableName,Defaults(DataverseTableName),{Column1:"test",ChoiceColumnName:ChoiceTableName.RED})

     

     

     

    Best regards,

    Rimmon

  • NPrice99 Profile Picture
    1,302 on at

    Hi @v-mengmli-msft 

    Sorry, My bad I should have said this was happening with a PowerAutomate Flow.

     

    Regards

     

    Nigel

  • ivan_apps Profile Picture
    2,189 Moderator on at

    Can you tell us if you’re doing a canvas app, model driven app or something else to add a record? 
    Please paste a screenshot of the error thrown too, so we can see context of where this is coming from.

    based on the Odata query it seems you may be using JavaScript or a Power Automate Flow…  

    if you’re using a flow, choices should be a dropdown in the UI. Don’t enter the words “red”, simply use the dropdown to select the Red option. If you enter a formula, then you have to use the option set number value. For testing purposes just enter the number value for Red directly without commas. It should work then.

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @NigelP ,

     

    Could you please show me current actions for update choice column?

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 Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard