cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smorley
Post Patron
Post Patron

SharePoint Lookup fields, Power Automate and multiplication expression

Hi Powerful ones,

 

I have 2 SharePoint lists.

 

1. Tutorial details, including the name of the tutorial, number of tutorials, length of tutorial.

2. Tutorial sign up.  The tutor signs up for the event they wish to teach.

 

Tutorial nameInstructorNumber of tutorialsLength of tutorialTotal teaching hours
Learn PAAhmed Smith13calculated
Learn PAJaleel Comeau13 
Learn PAJan Smithers13 
Learn SPAhmed Smith12 
Learn SPAlex Martinez12 

 

The bolded columns in the above table are lookup fields.

 

Total teaching hours on the far right is calculated by multiplying the Length of tutorial x number of tutorials.

 

Here's what my flow looks like:

smorley_0-1602173914873.png

smorley_1-1602173956287.png

smorley_2-1602174004153.png

float(variables('Number_of_Tutorials'))
 
 
 
 

smorley_1-1602174109809.png
float(variables('Tutorial_Time_Length'))
 
smorley_0-1602174180897.png

 

 
mul(float(outputs('Tutorial_Time_Length')),float(outputs('Number_of_Tutorials')))

 

 

The error I get is this:

Error: Correct to include a valid reference to 'tutorial time length" for the input parameter of action "compose total teaching hours"

 

I'm assuming it's syntax errors in the first two compose statements.

 

Any help, as always, is appreciated.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User
Super User

Hello @smorley 

According to the screenshots, the compose total teaching hours action should use the following expression:

mul(float(outputs('Compose_Tutorial_Time_Length')),float(outputs('Compose_Number_of_Tutorials')))

On the other hand, you don't need to initialize and then set the variable values. I mean, you can do it in the same initialize action (initialize the values with the expression). You will avoid 2 execution steps!

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

2 REPLIES 2
fchopo
Super User
Super User

Hello @smorley 

According to the screenshots, the compose total teaching hours action should use the following expression:

mul(float(outputs('Compose_Tutorial_Time_Length')),float(outputs('Compose_Number_of_Tutorials')))

On the other hand, you don't need to initialize and then set the variable values. I mean, you can do it in the same initialize action (initialize the values with the expression). You will avoid 2 execution steps!

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

You @fchopo are brilliant!

 

Thank you so much!

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 (4,324)