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

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

June 14th PVA AMA Carousel (up on May 25th, take down June 15th) (1).png

Join us on June 14th!

We're excited to announce the first Power Virtual Agents AMA on June 14, 2022!

Users online (2,447)