cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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
Highlighted
Dual Super User III
Dual Super User III

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!

Highlighted

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

Highlighted
Super User II
Super User II

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?

Highlighted

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!

Highlighted

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! 

Highlighted

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,563)