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

5 REPLIES 5
CFernandes
Super User III
Super User III

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)

View solution in original post

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

@it_dude 

 

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

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,656)