Patch Function in Power Apps : SharePoint Number Column
Patch Function in Power Apps : SharePoint Number Column
Let me show you, how to update a column of the type Number in SharePoint list using Patch Function in Power Apps.
Don’t forget?: our app should be connected to the data source, which is in this case our SharePoint List (Haidar-Soft_Demo_List).
We want to change The Number in this list to become 10.
Patch( ‘Haidar-Soft_Demo_List’, LookUp( ‘Haidar-Soft_Demo_List’, ID = 2 ), {Views:10} )
1) A Text Input Value Inside Patch Function
Below you’ll find the code to patch text input value to a SharePoint Number column using Patch Function in Power Apps. Here we use Vale function to convert the Object type to Number type.
Patch( ‘Haidar-Soft_Demo_List’, LookUp( ‘Haidar-Soft_Demo_List’, ID = 2 ), {Views:Value(TextInput3.Text)} )
This picture down explains how to use that Patch Function code inside Canvas App.
2) A Dropdown Specific Value Inside Patch Function
Below you’ll find the code to patch a Dropdown specific value to a SharePoint number column.
This picture down explains how to use that Patch Function code inside Canvas App.
3) A Slider Specific Value Inside Patch Function
Below you’ll find the code to patch a Slider specific value to a SharePoint number column.
Patch( ‘Haidar-Soft_Demo_List’, LookUp( ‘Haidar-Soft_Demo_List’, ID = 2 ), {Views:Slider1.Value} )
This picture down explains how to use that Patch Function code inside Canvas App.
Great, it seems that the SharePoint List has been updated.
You can also see How to patch the other SharePoint columns?here.