Behavior
- Last UpdatedJun 25, 2024
- 1 minute read
Use scripts for the Behavior property to manage records and edit values at run-time on a Base Form container.
To manage records and edit values at run-time on a Base Form container
-
Code the script as follows for the Behavior property of a Base Form container:
|
Task |
Script |
|---|---|
|
readEditBehaviourEnum.editable; |
|
readEditBehaviourEnum.readOnly; |
|
readEditBehaviourEnum.allowOnlyAdd; |
To manage records and edit values at run-time on a Base Form container based on the value of another control
You can manage records and edit values at run-time on a Base Form container based on the value of another control.
Example
If you want to manage records and edit values at run-time on the Employee Details (B1) container as per the selection in the Edit Information (R1) control, then you can code the script for the Behavior property of the Employee Details (B1) container as follows:
if(control.findById("R1").value === "0")
{
readEditBehaviourEnum.editable;
}
else if(control.findById("R1").value === "1")
{
readEditBehaviourEnum.readOnly;
}
else
{
readEditBehaviourEnum.allowOnlyAdd;
}