You are viewing limited content. For full access, please sign in.



How to Sum multiple field values using Workflow

asked on December 6, 2018 Show version history

I am retrieving multiple field values that all have a value of >=1 that we have setup in the search.  I am trying to sum all of these values, but continue to get the answer of 1.  When using the SUM action in the Token Calculator, it wants multiple values, but I only have the one token where it is retrieving the field values.  What am I missing?  Is there a way to split this out into multiple tokens from one Retrieve Field Values action?  Any help or guidance would be greatly appreciated.  Please see attachment for WF.

P.S. Only using the Find Entry and Assign Field Values to verify we are getting back the correct value.



Parcel WF.PNG
Parcel WF.PNG (12.8 KB)
0 0


replied on December 6, 2018

Alternatively skip the loop entirely. 

  1. Search Repository
    1. Retrieve Field Values as part of the search
  2. Assign Token Values
    1. Sum the results of the Search Repository token


3 0


replied on December 6, 2018

It looks like your token doesn't have multiple values because you're creating it fresh each time through the loop. 

Create the token before the loop, then modify the token to append values inside the loop.  That way your token calculator will have something to work with.

1 0
replied on December 21, 2018

Thank you very much for your input @████████.  With your help, we were able to get this working.



0 0
replied on June 26

@████████ I believe we were able to get this to work properly a few months ago, but now we still seem to be having issues.  Using what you described above we are receiving an answer of 1.  If possible, I would like to sum/count/add the page count of a number of documents that we search for, but when we retrieve the page count, we can only use the FirstResult_PageCount as a token.  We need to sum them.  On the other hand, we also need the sum of all integers in a specific field for a number of documents.  Can't seem to figure out what the issue is.  Do you notice anything we could be doing wrong?  Any help or guidance would be greatly appreciated.

0 0
replied on June 26

we can only use the FirstResult_PageCount as a token

My workflow designer is behaving the same way, only showing firstresult tokens.  I had to work around it by using a for each entry loop and appending current value page count to a new multi-value token, then sum the values of that token.  

Why couldn't I just sum directly from the additional properties of the multi-value output of the Search Repository?  I don't know.  It's a clunky workaround but it works.

0 0
replied on June 26

Perfect.....very convoluted, but was able to make it work.  Thanks for your quick response on such an older post.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.