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 / Unable to save values ...
Power Apps
Answered

Unable to save values in Option Set (CDS)

(0) ShareShare
ReportReport
Posted on by 62

Hi everyone,

I'm trying to create a canvas application based on Dynamics 365. At first, I had trouble relating records between them (1-to-many relationship) but I've been able to get this worked by using Common Data Service as the data source instead of using Dynamics 365 as the data source (more information here : https://powerusers.microsoft.com/t5/General-Discussion/Relate-serveral-records-to-an-other-selected-record/m-p/344449#M98850).

 

But now, the contents of dropdowns (global option set in Dynamics) isn't saved when I submit the form (screenshot below).

Before (canvas using Dynamics 365 as the data source), the two dropdowns referring to option sets were configured as follows:
'Industry Label_Datacard1'.Default = ThisItem.'Industry Label'
'Industry Label_Datacard1'.DataField = "_mso_industry_label"

DataCardValue59.Items = Parent.AllowedValues
DataCardValue59.Default = Parent.Default
This configuration doesn't work anymore (on canvas using Common Data Service as the data source) : no information is displayed in the dropdown.
So, I tried the following changes :
'Industry Label_Datacard1'.Default = ThisItem.Industry
'Industry Label_Datacard1'.DataField = "_mso_industry_label"

DataCardValue59.Items = Choices('Sous-rapports_1'.mso_industry)
DataCardValue59.Default = Parent.Default
dropdowns content is correctly displayed but the selected value isn't saved when the form is submitted.

After reading many posts on this forum (in particular :
https://powerusers.microsoft.com/t5/General-Discussion/Unable-to-Patch-CDS-entity-option-set-value-from-drop-down/m-p/280608#M81459 ), I tried to use the Patch function but in vain. Exemple of what I tried : 
On Submit button : 

Icon3_6.OnSelect = SubmitForm(Form_Subreport);;
Patch('Sous-rapports_1'; Form_Subreport.LastSubmit; {'Industry': DataCardValue59.Selected.Value)
(I'm not sure using Patch function is nessary.)
 

Do you have an idea to solve my problem? 

 

P.S. : I hope to have been clear. As you have probably noticed, English isn't my native language. Smiley Wink

 

Screenshot :

Capture12.PNG

Categories:
I have the same question (0)
  • Rebetcha Profile Picture
    645 on at

    Hi @F4b ,

    In the configuration you shared I miss what you have in the Update property of Industry Label_DataCard1.

    That is the property that determines what is saved to the datasource. 

    That should be DataCardValue59.selected.

     

    Can you check if this is the case?

  • F4b Profile Picture
    62 on at

    Hi @Rebetcha ,

     

    On my configuration, I have : 

    Industry Label_DataCard1.Update = DataCardValue59.Selected.Value

    "Value" is the only attribute I can choose.

    When it's DataCardValue59.selected, an error message appears: Text value expected.

     

    Thank you for your help.


    PS : More information : 

    Capture13.PNGCapture14.PNG

     

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

    Hi @F4b ,

    Is the Industry a Option Set Type column in your CDS Entity?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please consider set the Items property of the Industry ComboBox to following:

    Choices(Industry)

    Set the Update property of the Industry data card to following:

    DataCardValue59.Selected.Value

    If the issue still exists, please consider re-generate a new app based on your CDS Entity, then try it again, check if the issue is solved.

     

    Best regards,

  • Verified answer
    F4b Profile Picture
    62 on at

    Hi @v-xida-msft  and @Rebetcha,

    I had already tried with Choices(Industry) but an error was displayed.

     

    However, I've been able to solve my issue : I recreated the option sets and configure data card value with "Choices('Sous-rapports_1'.mso_industry)". It worked !


    I think the issue came from the change of data source (Dynamics 365 to CDS).

     

    Thanks a lot for your help !

     

    PS : Actual configuration of the Data Card Value :
    Capture15.PNG

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 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard