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

Need assistance with patch command (or how to update a field in sharepoint NOT on form)

Hi,

 

I have a form that submits and updates exactly as required. However, I would like to update the same sharepoint record at the same time with information that is NOT on the form. E.G Username, todays date etc.

 

I have a button onselect = submit(form1) this works for all data in form, but how do I add to it the additional data to write to the same record?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Anonymous 

The easiest way to do this is to add the columns you want to your Form and set their Visible properties to false.  Then utilize the Update property of those datacards to set the values you want all along with the Submit.  No further action needed.

 

However, if you want to still do this after the submit, then I would suggest putting a formula in your Form's OnSucess action.

A formula such as this:

UpdateIf(yourDataSource, ID=yourForm.LastSubmit.ID,
    {
       yourOtherColumn: yourColumnValue
    }
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@Anonymous 

The easiest way to do this is to add the columns you want to your Form and set their Visible properties to false.  Then utilize the Update property of those datacards to set the values you want all along with the Submit.  No further action needed.

 

However, if you want to still do this after the submit, then I would suggest putting a formula in your Form's OnSucess action.

A formula such as this:

UpdateIf(yourDataSource, ID=yourForm.LastSubmit.ID,
    {
       yourOtherColumn: yourColumnValue
    }
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Anonymous
Not applicable

Thank you worked like a charm.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,223)