Article ID: 10105
SAMPLE: Using IIF Function (Inline IF) in After Validation script to perform conditional branching in your data collection program
SAMPLE
Applies To: ITScriptNet V1/V2

This sample shows how to use the IIF function within the After Validation script of your program to determine which prompt to go to next based on input from the user. The Next Prompt is stored in a user variable which is then referenced by the Next Prompt script.

DETAILS

The following code is placed in the After Validation script of the Operation Prompt. This code determines whether program will display the Recieve or Ship Prompt next.
OPERATION PROMPT : AFTER VALIDATION SCRIPT

;Check the Entered Value
@NP@ = IIF($Operation$ = "1","Receive","Ship")
  • if $Operation$ = 1, @NP@ is set to "Receive"
  • if $Operation$ <> 1, @NP@ is set to "Ship"
OPERATION PROMPT : NEXT PROMPT SCRIPT

;Next Prompt
@NP@
Then @NP@ is placed in the Next Prompt script of the Operation Prompt to tell the Program which prompt to go to Next.

This article last updated: 1/1/2009 12:00:00 AM
Please help us improve the Knowledge Base by rating this article.
    © 1997-2026 Z-Space Technologies - a BCA Innovations Company - All rights reserved