Crow Canyon Software Forum
Reference Variables from script in Form Event Actions / Execute Script
Quote from Brian on April 8, 2022, 2:14 pmI did not see any examples of how to reference Form variables from the javascript in Execute Script - can this be done?
I did not see any examples of how to reference Form variables from the javascript in Execute Script - can this be done?
Quote from supportTeam on April 12, 2022, 3:53 amHi Brian,
Please use below functions to get/set variable values in execute script action in Form Event Actions.
1. Syntax to get value from a variable using custom script in NITRO Forms:
Syntax: window.ccs_g_FormUI.GetVariableValuebyName("Variable Name")
Ex: window.ccs_g_FormUI.GetVariableValuebyName("VarRequestStatus")OutPut: We get output in string/Object format, we need to use the output result as per as per our requirement in the custom script.
2. Syntax to update variable value using custom script in NITRO Forms:
Syntax: window.ccs_g_FormUI.SetVariableValuebyName("Variable Name",Variable Value)
Ex: window.ccs_g_FormUI.SetVariableValuebyName("VarRequestStatus","Closed")We are preparing article for variables in NITRO forms. We will send this article once it is published.
Hi Brian,
Please use below functions to get/set variable values in execute script action in Form Event Actions.
1. Syntax to get value from a variable using custom script in NITRO Forms:
Syntax: window.ccs_g_FormUI.GetVariableValuebyName("Variable Name")
Ex: window.ccs_g_FormUI.GetVariableValuebyName("VarRequestStatus")
OutPut: We get output in string/Object format, we need to use the output result as per as per our requirement in the custom script.
2. Syntax to update variable value using custom script in NITRO Forms:
Syntax: window.ccs_g_FormUI.SetVariableValuebyName("Variable Name",Variable Value)
Ex: window.ccs_g_FormUI.SetVariableValuebyName("VarRequestStatus","Closed")
We are preparing article for variables in NITRO forms. We will send this article once it is published.