Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Dataverse Choices Field

(0) ShareShare
ReportReport
Posted on by 1,292

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

Categories:
  • v-mengmli-msft Profile Picture
    on at
    Re: Dataverse Choices Field

    Hi @NigelP ,

     

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

  • ivan_apps Profile Picture
    2,187 Super User 2025 Season 1 on at
    Re: Dataverse Choices Field

    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.

  • NPrice99 Profile Picture
    1,292 on at
    Re: Dataverse Choices Field

    Hi @v-mengmli-msft 

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

     

    Regards

     

    Nigel

  • Verified answer
    v-mengmli-msft Profile Picture
    on at
    Re: Dataverse Choices Field

    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

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics