cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmclaughlin
Post Patron
Post Patron

In a powerautomate I need to update a sharepointlist item

In the update item I have this expression on one of the colums in the flow
 
sub(int('Floater Used'),int('Number of Days')) and
sub('Floater Used','Number of Days')
I've tried both ways. The thing is column 'floater used' and 'number of days' are both numbers in the sharepoint list already so I tried the Int function just as an attempt
 

I'm getting this error
InvalidTemplate
. Unable to process template language expressions in action 'Update_item_2' inputs at line '1' and column '3290': 'The template language function 'sub' expects its first parameter to be an integer or a decimal number. The provided value is of type 'String'. Please see https://aka.ms/logicexpressions#sub for usage details.'.

1 ACCEPTED SOLUTION

Accepted Solutions
v-JessicaG-msft
Community Support
Community Support

Hi @dmclaughlin ,

 

Do you want to use the column value in the SharePoint list as the parameter of the sub function to update the SharePoint item?

 

You could assign the values of columns in SharePoint to variables, and use the variables in the sub function to obtain the calculation results. I have test for your reference, please try the following workaround:

vJessicaGmsft_1-1637218334954.png

 

 

Best Regards,

Jessica Gu

View solution in original post

1 REPLY 1
v-JessicaG-msft
Community Support
Community Support

Hi @dmclaughlin ,

 

Do you want to use the column value in the SharePoint list as the parameter of the sub function to update the SharePoint item?

 

You could assign the values of columns in SharePoint to variables, and use the variables in the sub function to obtain the calculation results. I have test for your reference, please try the following workaround:

vJessicaGmsft_1-1637218334954.png

 

 

Best Regards,

Jessica Gu

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,466)