cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Data validation on selecting submit button...

Dear Power users,

 

I've created an App using a database from a Sharepoint list, and this App contains multiple pages.

Each page corresponds to a specific section of the list (General informations, Quality, Security, ... etc).

I duplicated my "FormNewCase" from the first page to each page (the name changes by FormNewCase_1, FormNewCase_2, ... etc) and I selected questions from the right section.

On each page, I've inserted a "next" button with the following command :

[action, on select:]  Navigate(Quality, ScreenTransition.Fade)   => to go to the Quality section

 

 On the last one I've inserted a "record" button to validate data in my Sharepoint list with the following command :

[action, on select :] SubmitForm(FormNewCase)

 

When I click on the record button data are not saved on my sharepoint list ! 😕

 

What do I forget ?

 

Thank you in advance for your support...

11 REPLIES 11
bdodu
Level 8

Re: Data validation on selecting submit button...

Did you use DataCards? Is it correctly pointed the Update property of each datacard?

Is the form in Edit mode or New mode?

Anonymous
Not applicable

Re: Data validation on selecting submit button...

You will find below some screenshot of what I did.

Capture 01.JPGDatabase informationsCapture 02.JPGinformation of the databaseCapture 03.JPGvalidation button

 

 

 

bdodu
Level 8

Re: Data validation on selecting submit button...

Ok I get it now.

You basically have not one but 3 forms.

When you press the button you submit actually only one form which is by the name the first one.

You should submit all of them by writhing another 2 commands after the first submit:

 

OnSelect = SubmitForm(FormNewCase); Submit(FormNewCase_2);Submit(FormNewCase_3)

 

 

Anonymous
Not applicable

Re: Data validation on selecting submit button...

Many thanks for your quick answer... I'm going to check and come back ASAP...

Anonymous
Not applicable

Re: Data validation on selecting submit button...

I'm back... So I made the modification and I don't have error but on my sharepoint list I have only the first part record (FormNewCase and not the others)

bdodu
Level 8

Re: Data validation on selecting submit button...

so you are sure you did bind all the forms to the same datasource and same record (may be gallery.selected)

Update property of each datacard is set to the right control

and onFailure of form2 and 3 is not triggered ?

 

Did you try to save only one form? let's say form2 with an additional temporary button trigger the Submit for form2.

If it is not updating sharepoint list than you need to check all the mentioned properties.

bdodu
Level 8

Re: Data validation on selecting submit button...

Community Support Team
Community Support Team

Re: Data validation on selecting submit button...

Hi @Anonymous,

 

Could you please show a bit more about your SharePoint list?

 

When you save data from your PowerApps app to your SharePoint list using Submit() function, you must make sure all required fields of your SP list are filled with value. In addition, the Submit() function only take effect on only one EditForm once time. 

 

If you use Submit(FormNewCase) formula within OnSelect property of Button control in the last page (Screen), this function could only submit form data within your first screen.

 

I assume that you have three Screens (Pages) within your PowerApps app, I have made a test on my side and please take a try with the following workaround:

  • Set OnSelect property of the Next Button control within first Screen (Page) to following formula:
Navigate(Screen2,ScreenTransition.Fade)
  • Set OnSelect property of the Next Button control within second Screen (Page) to the following formula:
Navigate(Screen3,ScreenTransition.Fade)
  • Set OnSelect property of the Record button control within last Screen (Page) to following formula:
Patch(StudentInfo,Defaults(StudentInfo),FormNewCase.Updates,FormNewCase_2.Updates,FormNewCase_3.Updates)

Note: The StudentInfo is a SharePoint list datasource within my PowerApps app. On your side, you should type the following formula within OnSelect property of the Record Button control:

Patch(YourSharePointListDatasource,Defaults(YourSharePointListDatasource),FormNewCase.Updates,FormNewCase_2.Updates,FormNewCase_3.Updates,...,FormNewCase_n.Updates)

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Data validation on selecting submit button...

Hello Kris and sorry to answer lately.

 

So about the "next button" that's what I have done.

About the "record button", when I click on it the app stays on the last page and my record doesn't work. 😕

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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