cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Azbo6587
Frequent Visitor

Patching Help

Hello,

 

I need some help getting the Patch function to update a text field input (TextInput8) within a sharepoint list ('Stock Items Requisition'), in a 'Quantity Unfulfilled' Column. My formula is below:

 

Patch( 'Stock Items Requisition', First( Filter( 'Stock Items Requisition', ID = 120 ) ), { 'Quantity Unfulfilled 1': TextInput8.Text } )

 

Now, where I have "ID = 120" - every website I look at tells me to use 'ThisItem' - but this isn't being recognized within my Powerapp. If I run the script as is, it WILL update ID record 120 with whatever I enter into TextInput8, but I want it to update the record I'm editing. How do I say 'ThisItem' without saying thisitem!

 

If anyone can help that'd be really appreciated.

 

Thanks

 

Aaron

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi  @Azbo6587 ,

 

If you have a button in the form, you could use this formula:

 

 

Patch( 'Stock Items Requisition', ThisItem, { 'Quantity Unfulfilled 1': TextInput8.Text } )

 

 

vxiaochenmsft_0-1631846509031.png

This will update the item your form selected.

 

Best Regards,

Wearsky

 

View solution in original post

5 REPLIES 5
zmansuri
Super User
Super User

Patch( 'Stock Items Requisition', LookUp( 'Stock Items Requisition', ID = 120 ) ), { 'Quantity Unfulfilled 1': TextInput8.Text } )

ThisItem only works when your patch button is on gallery. Or you are selecting something on the gallery. If that's not the case you need to find the record with lookup

Hello, 

 

Thanks - my issue is the 'ID = 120' bit. How do I say, the record I'm currently editing?

 

Thanks again

 

Aaron

How are you updating record? Gallery?

I'm just using a Form - no gallery.

v-xiaochen-msft
Community Support
Community Support

Hi  @Azbo6587 ,

 

If you have a button in the form, you could use this formula:

 

 

Patch( 'Stock Items Requisition', ThisItem, { 'Quantity Unfulfilled 1': TextInput8.Text } )

 

 

vxiaochenmsft_0-1631846509031.png

This will update the item your form selected.

 

Best Regards,

Wearsky

 

View solution in original post

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 (3,316)