Action Setting
Hide When (EtQScript)
Enter a formula (EtQScript) that controls the existence of the action (i.e., when the action will be hidden). Remember to use the EtQScript Editor features.
The action will be hidden if its ‘Hide When’ formula returns true (hide).
Example:
This script indicates that the [Delete] action button will be hidden when the user cannot use the [Delete] button if for example they are not listed in the ‘Who can delete documents' in the Application settings.
if (thisApplication.canUseGlobalDelete() == false):
print true
Execution Formula (EtQScript)
Enter a formula (EtQScript) that controls the Action’s functionality. Remember to use the EtQScript Editor features.
Usage Case: Writing an EtQScript formula for a subform’s Action
When the action is located on a subform, you shall use the thisSubformMethod to get the objects of the subform’s record from which the action is triggered.
Consider the following examples:
Example 1:
Customize a subform action to create a document for each of the subform’s records and populate the document’s Title from the corresponding record’s Title field:
myDoc = thisApplication.newDocument(285, 1114, thisDocument, "MY_LINK", "OTHER_DOCUMENTS", thisSubformRecord.getRecordID())
myDoc.setFieldValue("MY_TITLE", thisSubformRecord.getFieldValue("TITLE"))
myDoc.save()
Example 2:
Customize a subform action to create a document for each of the subform’s records and populate the document’s Title from the corresponding record’s Title field:
myDoc = thisApplication.newDocument("ATTACHMENTS", "INITIATION", thisDocument, "MY_LINK", "OTHER_DOCUMENTS", thisSubformRecord.getRecordID())
myDoc.setFieldValue("MY_TITLE", thisSubformRecord.getFieldValue("TITLE"))
myDoc.save()
|
|
|