cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
UluruRob
Helper II
Helper II

The value cannot be converted to the target type.

Unable to process template language expressions in action 'Update_item' inputs at line '1' and column '16283': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

I have a SP List 1 (Leave Entries) and SP List 2 (Leave Balances), I am simply trying to add the new entry ( Whole Days) from List 1 to another column in List 2 (CY Used) but get the above error. I have tried wrapping expression with & without 'int' and 'float' -  My flow is below - I appreciate any assistance with this flow or suggestions to do the same thing a different way? it is really frustrating that I cannot fix.

 

 

 

Flow Pt 1.jpg

 

Flow Pt 2.jpg

Flow Error.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Under Compose 3, can you please try:

You have already converted Compose and Compose 2 into int, so no real need to do this again

 

@{add(outputs('Compose'),outputs('Compose_2'))}

 

 

If you do want to explicitly convert to int before add, then use:

 

@{add(int(outputs('Compose')),int(outputs('Compose_2')))}

 


Notice that I am using outputs('Compose') within int() and then outputs('Compose_2') in another int() - so my position of closing circular bracket ) is different.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
happyume
Solution Sage
Solution Sage

After Flow run, (that gives failure) can you please expand Compose 3 and show us what is the result you are getting there?

@happyume Please see below for Compose 3 result, Thanks.

 

UluruRob_0-1634110188291.png

 

happyume
Solution Sage
Solution Sage

You have written all your formulas as plain text and hence you are seeing failure.

 

Either write the formula in the Dynamic Content window within the Expression tab, or put your formula as below:

 

@{ YOUR_FORMULA }

 


This applies to your Compose and Compose 2 actions as well.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

Now I have corrected all formulas I believe and created them in the expression builder (see first image), then ran flow and now receive this error at Compose 3?(see second image) If I am still writing the expression wrong please show me the correct formula.

 

UluruRob_1-1634112742939.png

UluruRob_2-1634112801064.png

 

Under Compose 3, can you please try:

You have already converted Compose and Compose 2 into int, so no real need to do this again

 

@{add(outputs('Compose'),outputs('Compose_2'))}

 

 

If you do want to explicitly convert to int before add, then use:

 

@{add(int(outputs('Compose')),int(outputs('Compose_2')))}

 


Notice that I am using outputs('Compose') within int() and then outputs('Compose_2') in another int() - so my position of closing circular bracket ) is different.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Thankyou the below formula worked and the flow works now, can you explain please what adding the wrapping 

@{ YOUR_FORMULA }

 means? Why doesn't the system accept the expression as written in the expression builder and allow it to save without error?

@{add(outputs('Compose'),outputs('Compose_2'))}

 

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
Users online (2,958)