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

Question

Question

Using token calculator to Add ForEach entry to total token

asked on September 7, 2016

I am working on a very simple workflow that will find all invoice entries in a folder, create a token to track a total, add to that total, email the final total.

 

When I run the workflow and track the tokens. my BatchTotal and NextTotal tokens are empty. The initial assignment of the value of 0 works. and then on each iteration when I update the tokens, they are empty.

Capture.PNG
Capture.PNG (66.4 KB)
0 0

Answer

SELECTED ANSWER
replied on September 22, 2016

Sorry about that, it's a known issue in Workflow 10 and it's being addressed for WF 11. If you don't need it to be a business process, just leave it off. If you do need it to be a business process, then the workaround is to add an Assign Token values and set the For Each token to it and use that instead of using the For Each token directly.

1 0

Replies

replied on September 7, 2016 Show version history

This is the output from the token tracker

( I removed this image )

 

it showed the BatchTotal and NextTotal values as empty

0 0
replied on September 8, 2016

Its probably as issue with your assign token activity. It looks like your not updating or assigning anything to the batchtotal token.

0 0
replied on September 8, 2016 Show version history

Thanks for the reply Xavier, 

In the assign token activity I have

Action: Modify Value
Activity: Make token for total
Token: BatchTotal

New Value: %(TokenCalculator_next_total)

0 0
replied on September 8, 2016

The bug is in your token calculator token, its never being assigned a value. Check the token values are numbers and not strings and

0 0
replied on September 8, 2016

ok this is the exact string I have

 

%(RetrieveFieldValues_Amount Payable)+ %(Total)

I marked Total as a number and the token calculator next_total is also checked as a number

should I be doing something different in there ?

0 0
replied on September 14, 2016

I don't see a "Total" token in your screenshots above, just "BatchTotal", so it looks like a typo maybe?

The following workflow works for me:

1 0
replied on September 20, 2016 Show version history

Thanks Miruna. seems so simple. The issue seems to be that the variables aren't holding the value. so I am looking into the template field type. It's the amounts payable field which in my template is

 

type:number
no constraints
format: custom  0.00

 

The strange thing is when I track the token, when BatchTotal is created is has the default 0. But after the first entry the BatchTotal is empty. 

 

NextTotal is always empty, track tokens doesn't show anything there in any iteration

 

This is the error.  is this a data entry error in the fields ?  when I output just that field.. it shows the values or when I track tokens.. it has the amount in the CurrentEntry var

Capture.PNG
Capture2.PNG
Capture.PNG (39.9 KB)
Capture2.PNG (66.15 KB)
0 0
replied on September 21, 2016

Any chance that this workflow is a business process?

1 0
replied on September 22, 2016 Show version history

yes it is, omg I turned off business process and it worked..

ok please help me understand :) thanks

0 0
SELECTED ANSWER
replied on September 22, 2016

Sorry about that, it's a known issue in Workflow 10 and it's being addressed for WF 11. If you don't need it to be a business process, just leave it off. If you do need it to be a business process, then the workaround is to add an Assign Token values and set the For Each token to it and use that instead of using the For Each token directly.

1 0
replied on September 22, 2016

ok thanks.. that is actually immensely helpful as I thought I was going crazy :) 

for the future, where do you recommend I look for issues I can track.

 

i.e: if I try something and it doesn't work as I expect, where would I double check to see if it's an issue ?

 

thanks for taking the time Miruna, again, super helpful :)

0 0
replied on September 22, 2016

There's the knob issues list on the support site, but that's not always up to date: https://support.laserfiche.com/kb/1013695/release-notes-for-workflow-10-

Answers is probably the best place for quick questions and second opinions.

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

Sign in to reply to this post.