TestProject Forum

Setting the parameter value by condition

HI
Help a newbie please!
What addon can this:
If parameter text value “7” then parameter index value “15”
If parameter text value “8” then parameter index value “16”
If parameter text value “9” then parameter index value “17”
If parameter text value “0” then parameter index value “18”

Hello @zeleznov.sergey

If your values can be only 7,8,9 or 0 then you can do that with 2 steps.
First, create a step using the action Evaluate Mathematical Expression.
And make the expression to be the value of the param + 18, save the result to the same param:

Click on Advanced Options and add a condition to make this step execute only if the parameter equal to 0:

image

One last this, change how to act if step fails? to Always Pass:

image

Now, create another step using the Evaluate Mathematical Expression action.
Using this expression: param+8 (as I can see it always +8 in case it’s not 0)

Set how to act if step fails to Always pass.
image

And add a condition for this step to execute only if the parameter not equal to 18 ( If it equal to 18 that means the step before done that)

image

Let me know if this meets your needs.

2 Likes

Thank you so much for your reply.