Forum Discussion

NLESM5's avatar
New Contributor
2 months ago

If... Then... Else


Is it possible to build in if then else functions in LoadNinja? Looking for a way to deal with different flows based on input in the same script instead of having two nearly identical scripts.


1 Reply

  • Humashankar's avatar
    Champion Level 2

    Hi NLESM5 

    LoadNinja currently lacks explicit if-then-else logic within a single script, but there are creative options to achieve similar functionality and manage diverse flows based on input.

    One approach is to divide your script into smaller, reusable scenario calls.

    The main script can dynamically call these sub-scenarios based on conditions, leveraging variables or data from previous steps to determine which sub-scenario to execute, effectively simulating if-then-else logic.

    Hope this helps - Happy to help further!!
    Thank you very much and have a great one!
    Warm regards