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
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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,934)