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

Patch SharePoint List Number Column

Hi, I'm I have a SharePoint list connected as a datasource with 2 columns, Title which is a single-line column and uajv which is a number column. When I use the Patch function, with this line of code

Patch(SPDSList, GallerySPList.Selected, {Title: SPTextInputName.Text, uajv: SPTextInputSalary.Text})

it gives me an error saying "does not match expected type number found type text". I have been searching around and found that someone says to not use anything after the TextInput ie. 

Patch(SPDSList, GallerySPList.Selected, {Title: SPTextInputName.Text, uajv: SPTextInputSalary})

On the other forum it worked for that user but now I am getting an "Unknown error occured" message.

 

My issue is just, how do I patch a SharePoint list which is a number type column.

1 ACCEPTED SOLUTION

Accepted Solutions
AKotb
Power Apps
Power Apps

you can use the Value function

 

Patch(SPDSList,
GallerySPList.Selected,
{Title: SPTextInputName.Text, uajv: Value(SPTextInputSalary.Text)})

that will convert strings to numbers

View solution in original post

1 REPLY 1
AKotb
Power Apps
Power Apps

you can use the Value function

 

Patch(SPDSList,
GallerySPList.Selected,
{Title: SPTextInputName.Text, uajv: Value(SPTextInputSalary.Text)})

that will convert strings to numbers

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 (1,261)