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 / Problem with save data...
Power Apps
Answered

Problem with save data from combobox

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, I have a question because I'm setting a value in combobox based on datacardvalue19.text. And I do this by writing to the combobox defalutselecteditems property of this function:

 

 

If(StartsWith(DataCardValue19.Text,"V") || DataCardValue19.Text = "NA" || DataCardValue19.Text = "NF",{Value: "Ves"},IsMatch(DataCardValue19.Text, "Sub", Contains) || IsMatch(DataCardValue19.Text, "sub", Contains) || IsMatch(DataCardValue19.Text, "SUB", Contains),{Value: "Submi"}, StartsWith(DataCardValue19.Text,"IM") || DataCardValue19.Text = "M",{Value: "Mag"},DataCardValue19.Text<>Blank(), {Value: "Sem" })

 

 

value changes to combox but does not write to the dataverse, when i click on SubmitForm.

Please help @RandyHayes 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    What kind of column is the underlying column in your datasource?

    Also, what is the Update property of the datacard for that field?

    And, what is the Items property of your combobox?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Column data type is choice, Update in combobox: DataCardValue5.Selected.Value 

    and Items in combobox is: Choices(CFT)

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Change your Update property to: DataCardValue5.Selected

    You are currently pushing a Value (simple text) to the underlying choice column.  Choice columns are records that are made of a record with a single column called Value.  Since you are using Choices in the Items property, it will already have records for each choice.  So, specifying the .Selected in the Update will provide the underlying choice column with the record it needs.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I get error: expected optionsetvalue value.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    What is your datasource?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    datasource for app is table in dataverse

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    So for Dataverse, you are going to need to supply the option set to the Items property of the combobox and your DefaultSelectedItems is going to also need to supply a valid optionset.  Right now, your Choices and Value records are like SharePoint choices - those are different in Dataverse.

     

    What is CFT in your Choices function?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    CFT is a column in dataverse with choice data type, and i have inside values from function which i type in post.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    What is the name of the datasource (dataverse table/entity)?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Shortages

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard