Is it possible to check if a step exists?

Hi all,
is it possible to check in an IF-Then Clause if a step exists?
I want to be more flexible to branch out to a step if it exists or go to another.
My steps (~100 now) have a strict naming convention:
step_$Number$todo
step
$Number$todo2
step
$Number$_todo3
..
step_proofing
step_end

but the steps “todo2” and “todo3” don’t need to be available if there is nothing to to.
In these cases the app jumps from the “todo” step to “step_proofing” instead.

So my idea was to proof whether
step_$Number$_todo2 exists and jump to this or jump to “step_proofing”

But I don’t find this possiblility.

So: is there a way to do so?

Regards Chris

Hi Chris,

Do all of the optional steps “step $Number$todo1” already exist in your app, but only get routed to if they are needed? Curious to better understand the use case for this app and the routing here.

Generally, we would advise for more simple apps, rather than one mega app with complicated routing between steps. Composable vs Monolithic Architectures

1 Like

Hi Beth,
this app is a big assambling overview of articles (exploded view) with a different amount of parts at different positions. All information regarding an article is stored inside a table and placed via variable fields.
Every article has the following steps:
step_$Number$_ ToDo
step_ $Number$_ Electrical
step_ $Number$_ 3DView

but some more complexe articles have additional assembly steps
step_ $Number$_ ToDo2
and if needed
step_ $Number$_ ToDo3
Example:
step_0001_ToDo
step_0001_Eelectrical
step_0001_3DView
step_0002_ToDo
step_0002_ToDo2
step_0002_Electrical
step_0002_3DView
step_0003_ToDo
step_0003_ToDo2
step_0003_ToDo3
step_0003_Electrical
step_0003_3DView
step_0004_ToDo
step_0004_Electrical
step_0004_3DView

step_Proofing
step_End

After getting all information from our ERP and from the TULIP tables I jump to the relevant step:
GotoStepByName ‘step_’ + @Variable.ItemNumber + ‘_ToDo’

At the moment I need to code the next step directly into the trigger, if a next step is available/needed.
GotoStepByName ‘step_’ + @Variable.ItemNumber + ‘_ToDo2’

My thought was to check if the step
‘step_’ + @Variable.ItemNumber + ‘_ToDo2’
exists and jump to it or I finished and jump to
step_Proofing
which is for every article the next step after mounting (ToDo).
IF the 2nd or 3rd ToDo-step is available I can change the “Next” button caption to “ToDo2/3” or “Proof”.

But I’m missing the function to check if a step exists.

I hope this is explained better :wink:

Regards Chris

We were looking to something similar for “print screen” steps via Print Step Group trigger where the number of printable steps required would depend on the number of table rows in the query results for whatever filters were applied.

For example, if we can display 10 rows per page, if the user filter inputs result in query output of 25 records, we would need to print three pages (and somehow tag the table data with which page the first ten, next ten, and last five records would be filtered for printing), so we would have the app print the step group that has three steps.

If there were 10-20 records, we would point the print trigger to the step group with only two formatted steps.

I think something similar with Step Groups could be leveraged for your use case.