cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BClouded
Helper IV
Helper IV

SubmitForm with CDS OptionSet not working to update a record

Hi Community

I can use some help on following issue. I'm trying to update a record in CDS using a Form. But it errors on some fields are not a valid format or missing required field. It should be something with the fields that has an OptionSet as fieldtype. 
SubmitForm is working to submit a new record with Form Item Property set to Defaults(Menio).
But when I try to update an existing record with it fails. Is this normal behavior and should I look for using Patch or Update?
Or do I miss something here?

Thanks for helping out!
Bart


BClouded_0-1600083000285.png

 

6 REPLIES 6

Hi @BClouded 

 

Can you share more details about the error that you are getting? What do you have in the Update property of the Option Set type field datacard? Also, when you are saving the new record, is it saving the value for Option Set? If you can share more details, we might be able to help you better.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi
This is the error message

BClouded_0-1600088889241.png

This is the Form

BClouded_2-1600088981233.png

The Update Property for those Dropdowns are: DataCardValue36.Selected.Value
It's basically just a default form I inserted. I only updated the Item property of the form to this: 
If(addNewMenio, Defaults(Menios), selMenioRec).
selMenioRec, is set by ThisItem.Menio (Menio is a lookup field in the Client entity, thisItem is a record in the Client Entity)

Hope this helps for understanding better! Thanks for thinking with me. Much appreciated!

Bart

GarethPrisk
Resident Rockstar
Resident Rockstar

Additionally, can you confirm that your Form is in FormMode.Edit? https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-form

 

I have done this by accident a few times, and have seen similar errors, since Forms will handle New vs. Edit differently. Is that Form's mode being set dynamically? Have you tried any of the explicit form 'resets' noted in the doc above?

Hi @BClouded 

 

Can you update the expression to:

 

If(addNewMenio, Defaults(Menios), LookUp(Menios, Menio = selMenioRec))

I am assuming that Menio is the name of column.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

That didn't helped either.
I ultimately removed the whole form and readded it. It now seems to function normally.
What could have been the issue or the trigger, is that I changed the entity to include attachments in CDS later on. Of course I refreshed my datasources in the App, but to  no avail.
Anyway is seems to function now! Thanks for your time mate! 

@BClouded 

 

Sometimes these issue occurs because of caching. Whenever you think, that there is something which is behaving strangely, clear the cache of your browser, logout and login again. It usually resolves the caching issue. If your issue is resolved, please accept the solution so that it is helpful for others having the same issue.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,402)