Record Visible
- Last UpdatedJun 25, 2024
- 1 minute read
Use scripts for the Record Visible property to show or hide a record.
To show or hide a record
-
Code the script as follows for the Record Visible property of a Base Form container:
|
Script |
Task |
|---|---|
|
return true; |
|
return false; |
Example
Consider a Base Form container Products (B1) containing a Text control Product Name (T1) and a Number control Quantity Available (N1).
If you want to show the record only when Quantity Available (N1) for a product is more than 500 units, then you can code the script for the Record Visible property of the Base Form container Products (B1) control as follows:
var productQuantityAvailable = Number(control.findByXmlNode("QuantityAvailable").value);
if(productQuantityAvailable > 500)
{
//// This will show Records having QuantityAvailable more than 500 units
return true;
}
//// This will hide Records having QuantityAvailable less than or equal to 500 units
return false;