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

Performing a save and also update a field value

Hello,

 

I am trying to incorporate a "Save & Submit" button. When this button is clicked, I would like to update a text field to "Yes" and also save the rest of the data on the form.

 

I currently have this

 

Patch('MyRequests', {ID: Value(ID_DataCard1.Default)},{'Start WF?':"Yes"}); SubmitForm(SharePointForm1);

 

However, this only saves the record without setting the value of the text field to Yes. I had to press the button again to update the text field.

 

Can this be achieved using Power Apps?  Please help

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @cooltechie 

 

Keep it

 

perform your ptach before these

 

 

View solution in original post

11 REPLIES 11
RezaDorrani
Dual Super User II
Dual Super User II

Hi @cooltechie 

 

Let it only submit form 

 

then on the OnSuccess property of the form

 do

 

Patch('MyRequests', formname.LastSubmit, {'Start WF?':"Yes"});

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi Reza,

 

Thank you for your response. Currently the On Success form event has

 

ResetForm(SharePointForm1); RequestHide()

 

Should I keep this or remove?

Hi @cooltechie 

 

Keep it

 

perform your ptach before these

 

 

View solution in original post

Tried and unfortunately it didn't work. It submits the form but doesn't update the field,

@cooltechie 

 

Share screenshot of OnSuccess property of the form

I take that back. I cleared cache and it seems to be working. Thank you.  Now how do I  make the button disabled after I submit?

Hi @cooltechie 

 

after your submit

the onscuccess property will patch then reset form and then request hide (which should close the form window)

so not sure why you need to disable the button

That is a requirement. The reason is that if the user views the form the disabled button will tell him that it was submitted,

Hi @cooltechie 

 

Is this a submit button that you created or is the the default submit button that shows up on the form screen menu?

 

I need to understand the scenario when you want to disable

A screenshot would help

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,898)