I have an issue on my PowerApp that the editform is not saving to SharePoint list item first time if I have an if statement in the onSave section in SharePointIntegration.
Steps to reproduse the issue:
1:When I open the SP list - make changes - it will not save the changes to the listitem
2: When I open the editform again it saves the changes in the listitem.
3:If I refresh the list and try again it will not save first time, but all next times it works to make changes.
I have checked that the form is EditForm each time, and that the if statement get hit in the right place each time.
the if statement looks like this:
I have also tried this if statement:
If the onSave looks like this it will make the changes.
Anyone who knows why this is happening, and how to avoid it to happen.
Do you want to judge the form mode when you submit form?
There is no need to use the if function, because before submitting any changes, this submit form function checks for validation issues with any field that's marked as required or that has one or more constraints on its value. This behavior matches that of the Validate function.
More reference about submit form function:
Hope this can be helpful.
That is not my the issue here. I have a createform and an editform. If I create an element it creates listitem in the SharePoint list, but if i edit the item it doesn't save the changes first time, but if i open the form again and types in the changes again and save the form, it does save the changes in the SP listitem.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand