cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BClouded
Advocate II
Advocate II

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
yashag2255
Dual Super User II
Dual Super User II

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?

yashag2255
Dual Super User II
Dual Super User II

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! 

yashag2255
Dual Super User II
Dual Super User II

@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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,966)