cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ragnhild
Level: Powered On

First Submit on Submit Form Does Not Work

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:

If(SharePointFormMode="EditForm";SubmitForm(SharePointForm_Edit));;If(SharePointFormMode="CreateForm";SubmitForm(SharePointForm_New)) 

I have also tried this if statement:

If(SharePointFormMode="EditForm";SubmitForm(SharePointForm_Edit);If(SharePointFormMode="CreateForm";SubmitForm(SharePointForm_New)))

 

If the onSave looks like this it will make the changes.

SubmitForm(SharePointForm_Edit);

 

Anyone who knows why this is happening, and how to avoid it to happen.

 

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: First Submit on Submit Form Does Not Work

Hi @Ragnhild,

 

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:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-form

 

Hope this can be helpful.

Best Regards,

Yumia

 

Ragnhild
Level: Powered On

Re: First Submit on Submit Form Does Not Work

Hi @v-yuxima-msft

 

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. 

ekarpavicius
Level: Powered On

Re: First Submit on Submit Form Does Not Work

I have the same issue but only for an attachments datacard, all other fields update fine.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,138)