sum multiple line items to another list under conditions

  • 18 August 2020
  • 1 reply
  • 0 views

Badge +3

=SUMIFS(field6,field2,"11",field3,"10")

Need a workflow that queries list A

Looks in Field 1 to see if it contains the number 11

And

Looks in Field 2 to see if it contains the number 10

If true it gets the number in Field 6 of that Item ID and stores it.

Then after collecting all in list that meet this fact

Adds them up and stores in a col variable

Then takes that number and puts it in List B Field 2 for this fact.

 

8718i7F2F0D13F4144520.png

 

I have tried the following:

8719i3773B57AC3F3D36C.png8720iD4A25DFAA7512A2D.png8721i2F882C0B60B61C80.png8722i4F0DBE5F36AEEE06.png8723i17359F331180CB07.png

Any Ideas what I am doing wrong?


1 reply

Userlevel 6
Badge +22
Hi,

The issue is the collection operation.
It is using the POP operation which only grabs the last value out of the collection and stores it in your variable. It is not used to total all the values.

You need to run the collection variable through a For Each action that contains a Math Operation that adds each item in the collection to a grand total varaible.

Reply