Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Subtracting a field in one list from a field in a second list and then update



What I want to do is to subtract the value of a field from list A from a field in list B and then update the field in list B with the new value. I'm using a Compose action, but I haven't got the syntax right. I'm pulling fields for the input in the Compose action from the Dynamic content. Where am I going wrong? Thanks in advance and Happy New Year!



Super User
Super User



The format seems to be incorrect, you have specified the expression as sub(qty),qty) it has to be sub(qty,qty)

Bracket has to be closed after specifying both the quantities.


For more insights related to expressions please visit - Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs


If the information shared helps you, please consider giving a thumbs up 👍 and mark solution as resolved.

Thanks @Gopala_Krishna that worked, but now I'm having trouble getting the value from the secondary list. I'm using a Get Items action then trying to store the filed value Qty using Initialize variable but as soon as I try Power Automate adds a Apply to each loop and then won't let me save the Flow. Any idea how I can get the value to use in the formula? 



Helpful resources

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (47,651)