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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (936)