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

Question

Question

Can you make a gateway decision based on a calculated field?

asked on October 31, 2018

Wondering if there is an issue with making a gateway decision using a calculated field? Or an issue with making a gateway decision using a calculated field that gives a boolean value?

I have attempted both Inclusive and Exclusive gateways.  I have attempted conditions on both.  I have attempted one as the default path.  When I based it on a calculated field it always terminates.  I can use the same gateway on a field that does not use a calculated field and it works fine.

Thoughts?

Calculated field: =(NETWORKDAYS(DeadlineCurrentDate,DeadlineSubmissionDeadline))<20

Gateway: /dataset/DeadlineCalculateCount="True"

 

Basics are I have 2 dates fields on the form.  I use a calculated field to see if there are less than 20 business days between the dates.  I need it to follow one path if there are less than 20 days and a different if there are more.

For the gateway I have tried True/False; TRUE/FALSE; and 1/0 combinations.

 

Thanks!

 

0 0

Replies

replied on October 31, 2018

I created a starting form with a number field (called Number_1) and a single line field (called DeadlineCalculateCount like yours). I used the calculation =Number_1<20 for the single line field which returns TRUE if the number field is under 20, FALSE if the number field is 20 or higher. 

I got the gateway outflows to work with 

/dataset/DeadlineCalculateCount="FALSE" and

/dataset/DeadlineCalculateCount="TRUE"

If this isn't working for you, go to the terminated instance in Monitor and check on the value of DeadlineCalculateCount to make sure it's TRUE or FALSE. If not, you might have a problem with the calculation. 

If that doesn't work for you, you could try doing the calculation in the outflow conditions. Make a new number variable and use the calculation  

=(NETWORKDAYS(DeadlineCurrentDate,DeadlineSubmissionDeadline)) without the <20 piece. Then in the outflow condition, use /dataset/NumberVariable < 20 

 

0 0
replied on November 1, 2018

Thanks for the advice but it is still failing for me.  The field I am basing it off of does indeed show True.  I have more than just the outflow condition using this field.  I also use it for show/hide rules.

I ended up just running a workflow prior to the decision where I feed back a new variable that says Yes or No and I made my decision based on that text field.

True/False in the original field works fine for show/hide rules I just can't make the gateway decision work off it.

I recreated what you did - just a number field and the field with the formula.  I can't even make the gateway work with this.  It still terminates.

I am working in Professional Version 10.2.1.246

Gatewayfailed.png
0 0
replied on November 1, 2018

I needed to use all caps "TRUE" and "FALSE"

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

Sign in to reply to this post.