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

Submit button to send info to SharePoint AND then navigate to a new "complete" screen

Hello everyone, 

 

I have a Power Apps form that I am using for QA purposes that has 5 screens: 

 

Intro Screen 

 

QA Service #1

QA Service #2

QA Service #3

 

Then a "You have successfully submitted your QA" screen.  

 

Each screen is for a different QA service and has it's own "Back" and "Submit" button along with fields, drop downs, etc.  I want the SUBMIT button in each screen to send the data of that screen only to SharePoint, but then also navigate them to the last screen to show that "Your QA has been submitted successfully" 

 

I'm pretty new to Power Apps, so trying to use the simple approach - so any assistance is greatly appreciated. 

 

Thank you!

 

36 REPLIES 36

Hmmm... I must be doing something wrong.  It's giving me an error: 

 

"Invocation of unknown or unsupported function" 

 

 

I attached a screen shot.  I appreciate everyone's help! 

@ianallen13 

SubmitForm(yourFormName)

is what you want...

Sorry for the typo in the original response.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

No worries, but I have to be doing something wrong here... still getting some error messages: 

 

"The function expects an editable form as its input" & "The function "SubmitForm" has some invalid arguments...

 

Literally what I have:    SubmitForm('Clinical Registration QA Screen')    

 

I have to be missing something here.  I have no published this form, so not sure if that has anything to do with it yet?  

@ianallen13 

Yes, as mentioned...you need to use the NAME of your Edit Form control, not the screen name.

 

Of course...all of this is assuming that you are using an Edit Form control, or did you custom build the screen adding your own controls throughout?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hey Randy, 

 

Nope, built it control by control for each screen.  So perhaps that is part of the issue?  

@ianallen13 

Winner winner!!  There we go!

Nope, you cannot use the SubmitForm function then.  

 

So, your choices are as follows:

1) Use an EditForm instead of your own controls

2) Use the Patch function on your Submit Button.  

  Ex:

Patch(yourSharePointDataSource, Defaults(yourSharePointDataSource),
   {SharePointField1: TextInput1.Text,
    SharePointField2: TextInput2.Text,
   ...etc...
   }
);

Navigate(yourSuccessScreen)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Thank you for your help with this!!  Truly!

 

Let me try these and see if these yield the results I need... 

 

Much appreciated.  

 

Stay tuned... 

@ianallen13 

Sounds good...give them a try and feel free to post back if you run into more issues.

 

Doing your own forms gives you plenty of control and flexibility on layout, but at the cost of doing your own Add and Update logic and error checking.

Doing Edit Forms takes all the "dealing with logic" out of your hands, but is a little less flexible on layout.  And, I find people get a little confused on them at first, but after you toy around with them a bit, they have their place.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hi Randy, 

 

So I'm attempting the PATCH function and I'm a bit stuck.  This is my first attempt at moving away from InfoPath (for me and my department), and this submit part is the last piece of the puzzle (or one of the last) that I need.  

 

So I am using your example, but I am not sure with some of the fields.  I have a SharePoint page that I created to house all the data that I want the form to submit.  Currently it is blank (no columns, nothing).  Is that okay for PowerApps?  

 

So here is where I'm at: 

 

Patch('MySPDataSource',Defaults('MySPDataSource', { ...  then from here I'm not sure what SharePointField1: TexxtInput1.Text, etc. is or what you meant or how to build this out?  Like I mentioned, I don't have anything in the SP page... 

 

Sorry for the dumb/silly questions, but like I said, I do appreciate your help with this.  

 

If it helps, I can provide you with the names of my form fields or another screen shot.  Just let me know.  This is the last part for me to complete this, so I feel like I'm almost there... 

@ianallen13 

No worries...this is the place to ask these questions!

 

So, you're going to need columns in your SharePoint list to start with.  These will be the place that you patch to. 

PowerApps will not make columns in SharePoint.

 

And, your next hurdle will be that, since you've already added the SharePoint list as a datasource, you'll need to add the columns in SharePoint and then, first, attempt a refresh on the DataSource in the designer.  Depending on your changes, you might need to go so far as to remove the datasource and then add it back.

 

Then, once your columns are in place, you can construct your Patch formula with the fieldname:value as I showed in the prior responses.  

See if that gets you to the next step.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,182)