cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
it_dude
New Member

mul() finction

Hi world,

 

When i use mul(int(outputs('compose')),'xx') it works but when i try to use mul(int(outputs('compose')),int(outputs('compose2'))) i am getting this error.

Error:

InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '1' and column '16988': 'The template language function 'mul' 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#mul for usage details.'.

 

Can some help me with this issue and explain it to me?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @it_dude ,

 

Can you try float().

 

mul(float(outputs('Compose_2')),8.4)

View solution in original post

6 REPLIES 6
CFernandes
Super User
Super User

Hey Mate @it_dude 

 

You should not get an error. I did a quick test and my flow succeeded.

 

CFernandes_0-1610963331063.png

 

Expression used. 

 

mul(int(outputs('Compose')),int(outputs('Compose_2')))
 
Can you give the above a try.
 
 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thanks for your fast response @CFernandes 

This is my flow.

 

 

pic2.PNG

 

 

CurrencyUSD:

mul(int(outputs('priceusd')),8.47)
Compose:
Get`s a number from a sharepoint list.
Compose:
mul(int(outputs( 'CurrencyUSD' )),int(outputs( 'compose22' )))
 

 

pic1.PNG

 

 

Error:

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

Hello @it_dude ,

 

Can you try float().

 

mul(float(outputs('Compose_2')),8.4)

Change "int" with "float" did the work. Thanks @CFernandes  !!!

@it_dude 

 

Wohoo. I am glad that the problem has been resolved. 

mul(int(outputs('Compose')),int(outputs('Compose_2')))
 
for this, what i must change for ( float ) where i can replace (float ) on my expresiion ?
 
thanks for your help

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (3,759)