cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Responsive Resident
Responsive Resident

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?

Highlighted
Anonymous
Not applicable

Re: Data validation on selecting submit button...

You will find below some screenshot of what I did.

Database informationsDatabase informationsinformation of the databaseinformation of the databasevalidation buttonvalidation button

 

 

 

Highlighted
Responsive Resident
Responsive Resident

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)

 

 

Highlighted
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...

Highlighted
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)

Highlighted
Responsive Resident
Responsive Resident

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.

Highlighted
Responsive Resident
Responsive Resident

Re: Data validation on selecting submit button...

Highlighted
Community Support
Community Support

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.
Highlighted
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
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,315)