Abbreviations, used in manual:
RDA - Reference Data Admin
RDAD - Reference Data Admin Designer
FW - Form Wizard
In RDAD module, in the left side menu, under specific Project, go to “Scripts” component and
click “Add Script” button:
The following form will open:
2. Fill in all required fields:
- Name - Script`s name.
- Description - describe the script purpose.
- Script Type - possible to choose one of predefined options, in our case it'll be "SQL Query" option:
- Data Source Name - select a Data Source from the list.
- Return type (*Optional) - chose "Success" or "Failure":
Return Value - the return value defines whether the script succeeds or fails, depending on the chosen return type. Full example is shown below.
Note: the 'Return Value' field appears only when selecting a value for 'Return Type(*Optional)'.
Success return type - if returned value equals to the results from the query, successful message will appear and will enable the Scriptable Button in FW. If returned value is not equal to the result from the query, failure message will appear and will disable the Scriptable Button in the FW.
Failure return type - if returned value equals to the results from the query, failure message will appear and will disable the Scriptable Button in FW. If returned value is not equal to the result from the query, successful message will appear and will enable the Scriptable Button in FW.
For example: The result of a certain script is the number 89.
There are 4 different cases:
1. Define Success as the Return Type and 89 as the Return Value. Result of the script is success as seen in the image below.
2. Define Success as the Return Type and 80 as the Return Value. Result of the script is failure as seen in the image below.
3. Define Failure as the Return Type and 89 as the Return Value. Result of the script is failure as seen in the image below.
4. Define Failure as the Return Type and 80 as the Return Value. Result of the script is success as seen in the image below.
Use Form Filtering - when enabled, the script will affect only the filtered rows that appear in the FW in Step 4/ RDAE.
For example: for a Sales FW that has a scriptable button of type 'SQL Execute' such as follows:
The FW has the following default filter set up:
When then toggle is off and the script is executed, all rows in the table will be affected.
When the toggle is on and the script is executed, only rows with an id less than 11 will be affected.
Note: For additional information regarding scriptable buttons, use this manual.
For additional information regarding default filters, use this manual.
Refresh Main Grid On Execute - when enabled, will update the FW (including KPIs) on each Script run.
Timeout - allows to stop the Script run if exceeded a certain time. Insert a value and choose a measure (None, Minutes, Hours, Days).
Script Code - insert required SQL query. Script needs to be related to true or false condition in order to enable or disable return type.
- "Add script" - Enable to run script row by row
We also can use this script in Form Wizard in Step 3.
We can add a button that will do the command of the script we want.
For example:
We would like to return all the values from the table that they are women :
When we click on it in step 4 in FW we will make a change on the table using this button.
For example:
In order to create a Scriptable Button please refer to the related manual:
https://quilliup.zendesk.com/knowledge/articles/360008553520/en-us?brand_id=739241
We will add this script to scriptable button -> step 3 -> Edit Setting->scriptable buttons
The button will shown in Step 4-
Comments
0 comments
Please sign in to leave a comment.