Note: Not all of the sub-inspection test toolbar buttons are technically "tests." For simplicity, that term is used to describe all of the sub-inspection test toolbar buttons.
The Formula test executes Python™ script (for PCs) or LiveCode (for iPads) to customize the inspection. Using this feature is recommended only for use by Hertzler Systems technical experts or others who are well-versed in programming methods and languages.
Click the Formula test toolbar button to add this test to the sub-inspection.
Set any properties for this test on the Properties panel that displays after the test is added.
For information about using the Properties panel, see Changing property settings.
All properties apply to inspections run in the PC Collect module except for those in the Mobile (Legacy) section. Properties that apply to mobile inspections are indicated in the Mobile column below.
Property |
Default setting or default display |
Allows |
|
Appearance |
|||
[blank] |
Enter text for a label and formula description. |
Y |
|
[Blank] |
When the FormulaMode property is set to ClickToggle, this is the text to display on the button while the script is running. If this is not set (left blank), the text in the Label property will be displayed while the script is running. |
||
Regular. Test is full-sized. |
Short. Helps you to fit more tests on the screen. Test may be shorter, and white space above and below this test may be reduced. |
||
Behavior & Data |
|||
Pre. Executes the formula before the operator can interact with the sub-inspection. |
A Post formula is executed when the sub-inspection is submitted.
Click displays a button the inspector taps to run a formula. For this to properly function in GS Collect, the FormulaLocation property must be set to Local.
ClickToggle [PC only] also displays a button. When clicked, the script runs repeatedly until the inspector clicks the button again to finish running the script. This is especially useful in conjunction with the DataCanvas function.
An OnChange formula is executed when another test on that sub-inspection meets certain conditions. When the sub-inspection is submitted, the OnChange formula is also executed one last time before any Post formula (if one exists) is executed.
Cancel [PC only] executes the formula when the sub-inspection is cancelled (but before any final OnChange formula is executed). If the PC Collect module displays the warning message about unsaved data being lost, this formula will be executed after the user clicks Yes to exit. |
Y |
|
[Blank] |
Use the Python Script Editor to create, edit and debug a Python script. You can double-click on the Formula test to edit the Python script or choose a different script. |
|
|
A unique TestID number is automatically assigned to each test in the inspection, but you can change this number to a more meaningful name. The value of the TestID property in a Formula test is used when the FormulaMode property is set to Click. |
Enter a name for the TestID. |
|
|
Mobile (Legacy) |
|||
Local. Uses the mobile device to execute the formula. |
RunAtServer executes the formula using the server associated with the device. SqlAtServer executes the formula using the server’s database. Updates and deletions are not tracked in the Audit Trail. Also see FormulaMobile property. |
Y |
|
[blank] |
Enter LiveCode code or the SQL statement depending on the FormulaLocation property value. Add a command line to run when the FormulaLocation property is set to RunAtServer. You can double-click on the Formula test to edit the LiveCode code. |
Y |