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

Question

Question

Get current stage

asked on February 13, 2018

Is there a way to get the current stage that an user task is in, similar to how you get the current step?

 

Like in the screenshot below, get the value "Some other stage", so that I can use it to detect where in the process the user task is with Javascripts.

Right now we've been working with getting the current step, but if there are, say, 5 steps that we need to do something for, then that means that we have to do...

If (step = this, or step=that, or step=thisandthat or step=thatandthis) then do something.

and we were hoping to accomplish this quicker so that we could just do...

if (stage = Some other stage) then do something.

Also that would aliviate the need of having to update the code when you rename a step.

Any suggestions, ideas or guidance?

Thank you,

Raul Gonzalez

stage.PNG
stage.PNG (26.83 KB)
1 0

Answer

SELECTED ANSWER
replied on February 22, 2018

Step id is on the top right corner of the task dialog like this:

0 0

Replies

replied on February 22, 2018

Hi Raul,

There is no variable for getting current stage now. 

Besides, instead of step name maybe you can use step id, which has a less chance to be changed.

0 0
replied on February 22, 2018

Thanks Rui,

Step id huh? I hadn't thought of that!

I suppose there is no easy way to get the step id, until you output it somewhere in the form to find what it is first?

Either way, I think that works better than the step name, as we keep getting the user task names changed, which makes us change the javascript too.

Thanks for the tip Rui.

Raul Gonzalez

 

0 0
SELECTED ANSWER
replied on February 22, 2018

Step id is on the top right corner of the task dialog like this:

0 0
replied on February 23, 2018

Rui, you are the best. Thank you.

 

Raul Gonzalez

0 0
replied on February 22, 2023

Hi Rui-

Any updates on this? I'd like to use Stage with some of my logic but I don't see it as a default value token or even available as a token in Workflow.

0 0
replied on February 22, 2023

Hi Pieter,

For tokens we only support current step.

If you use modern form, there is field rule criterion option "Process Stage" and you can use it to show/hide or validate the fields.

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

Sign in to reply to this post.