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 / The column in the data...
Power Apps
Unanswered

The column in the data source you are updating expects an option set value

(0) ShareShare
ReportReport
Posted on by 87

Hi i have a CDS table which i store options for a radio control as follows and i populate a collection with these values and filter them via the  field name  column when setting the items of each radio control as follows.  Filter(colChoicesConfig, 'Field Name' in "Gender") . I'm having a issue when trying to store the selected values in another collection which is derived from another CDS table. The columns are choice columns and  i get the following error The column in the data source you are updating expects an option set value and you are using type text. How do i convert the selected value or otherwise have the correct format in the first place 

 UpdateIf(
colApplication,
true,
{'Gender': Radio1.SelectedText.Choice}

)

 

Field Name     Choice

Gender          Male

Gender          Female

Gender          Other

Region           UK

Region           EU

 

Thanks in advance Esox76

 

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@Esox76,

    Based on the issue that you mentioned, do you want to update the Choice column based on the Radio selected?

    Could you please share a bit more about the scenario:

    1. how you create this collection "colChoicesConfig"?
    2. why you don't update the Table directly?

    To update the Choices column within Dataverse, you should follow a format like:

     

    'OptionSetName (TableName)'.Option1

     

    On your side, please try to modify your formula as below:

     

    UpdateIf(
     colApplication, 
     true, 
     {
     Gender: 'Gender(TableName)'.Choice1
     }
    )

     

    Hope it could help.

    If the above formula could not help you, please do tell me how you create the colChoicesConfig and colApplication?

    Regards,

    Qi

     

     

  • Esox76 Profile Picture
    87 on at

    The colChoicesConfig collection is created from a Dataverse table as below

     

    Field Name     Choice

    Gender          Male

    Gender          Female

    Gender          Other

    Region           UK

    Region           EU

     

    I use this collection to provide options for a generic combo box control which works as expected. Because my canvas app stores it's information locally i use a collection to store the data and then patch Dataverse. Its when i try to store the data in the local collection that i get the issue of The column in the data source you are updating expects an option set value and you are using type text. I'm updating the local collection on the OnChange of the Combo. The local collection has been created for another table in dataverse which i then patch.

     

    Hope this helps 

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@Esox76,

    No, I mean a formula how you create your collection, post your formula for the collection!

    1. Post the formula how you create the colChoicesConfig and colApplication
    2. Do you have a Table containing 2  Choices columns named 'Gender' and 'Region'
    3. How you set the Items property of the Combo Box?

    I must that I could not guess all the details that could solve your problem, so please provide more key details.

    Besides, the colChoicesConfig to populate the Combo Box is not a good choice, I think you could directly set the Items as the Choices column.

     

     

    Choices(TestUpdateChoices.'Region')

     

     

    Regards,

    Qi

  • Esox76 Profile Picture
    87 on at

    Here is how i create the collection  from dataverse table as outlined above . I contains two fields Field Name   and   Choice

     

    ClearCollect(
    colChoicesConfig,
    'Choice Configurations'
    )

     

    The problem is that Combo i am populating is a generic one displayed in a gallery so in row one of the gallery the combo is Gender in row two  the combo is region so I have logic to populate the combo based on the  the row in the gallery .  

     

    How i populate the combo

     

    Switch(
    ThisItem.'Associated Field ',
    "Gender",

    Filter(colChoicesConfig, 'Field Name' in "Gender"),

    "Region",

    Filter(colChoicesConfig, 'Field Name' in "Region"),

    )

    Hop this helps. I can't use your solution above since the generic single select combo does not like multiple data sources. 

     

    Thanks Esox

     

     

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 Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard