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

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
Super User
Super User

Re: Performing a save and also update a field value

Hi @cooltechie 

 

Keep it

 

perform your ptach before these

 

 

View solution in original post

11 REPLIES 11
Super User
Super User

Re: Performing a save and also update a field value

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

cooltechie
Level: Powered On

Re: Performing a save and also update a field value

Hi Reza,

 

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

 

ResetForm(SharePointForm1); RequestHide()

 

Should I keep this or remove?

Super User
Super User

Re: Performing a save and also update a field value

Hi @cooltechie 

 

Keep it

 

perform your ptach before these

 

 

View solution in original post

cooltechie
Level: Powered On

Re: Performing a save and also update a field value

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

Super User
Super User

Re: Performing a save and also update a field value

@cooltechie 

 

Share screenshot of OnSuccess property of the form

cooltechie
Level: Powered On

Re: Performing a save and also update a field value

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?

Super User
Super User

Re: Performing a save and also update a field value

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

cooltechie
Level: Powered On

Re: Performing a save and also update a field value

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

Super User
Super User

Re: Performing a save and also update a field value

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 90 members 3,675 guests
Please welcome our newest community members: