Difference between revisions of "Expressions"
(Created page with "Home > Databoxes > Using a Databox - Expressions Using a Databox - Expressions When using Databoxes within a Script you may wish to manipulate the data in the Databox, combi...") |
|||
Line 1: | Line 1: | ||
− | + | ==Expressions== | |
− | + | When using databoxes within a Script you may wish to manipulate the data in the databox, combine it with data from another databox, or perform a conditional assessment on the data to decide which path in the script to take. | |
− | |||
− | |||
− | When using | ||
Each of these actions is performed by defining an Expression against the relevant Databox that will manipulate the data within it. | Each of these actions is performed by defining an Expression against the relevant Databox that will manipulate the data within it. | ||
+ | A full list of expressions used in Keyfax Inter•View can be found in [[Expressions|Expressions]]. | ||
− | + | An Expression can be written as either a '''Transformation''' or a '''Logical Assessment'''. | |
− | |||
− | |||
− | |||
− | An Expression can be written as either a Transformation or a Logical Assessment | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ===Transformation Expressions=== | |
+ | Transformation expressions re-format the data within the databox. These are usually used when the core data stored in the databox needs to be pulled out in a different format or when the data needs to be mathematically manipulated. | ||
− | + | Examples of a transformation are: | |
+ | *Reading the value of text in a databox and putting it in UPPERCASE. | ||
+ | *Multiplying the data in a databox. | ||
+ | *Reading only the first 3 characters of the data held in a databox. | ||
+ | *Reading the contents of a databox and then adding it to the value held in another databox. | ||
− | + | ===Logical Assessment Expressions=== | |
− | |||
− | |||
− | |||
− | + | A logical assessment (conditional) expression assesses the data within a databox. The expression used in a logical assessment should return a '''True''' or '''False''' value. | |
− | + | Examples of a logical assessment are: | |
+ | *Taking a particular path in a script if a databox value is greater than 10. If it is not greater than 10 then a different path is taken, as shown above. | ||
+ | *Changing the script set to be used if the user is set-up in a particular business group, this would be based on the information based in the import XML | ||
+ | *Taking a particular path in a script if the date is between the beginning of April and the end of November, for example winter months may increase the priority of some repairs. | ||
− | + | ==Defining an Expression== | |
− | + | Expressions are defined by editing the properties of the relevant Databox. Click on the plus button to add a new expression. This presents a new expression line that needs to be defined: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | [[File:definingexpression41.png]] | |
+ | *'''Title''' – The Title for the Expression. The 'Tab' key can be used to navigate between cells. | ||
− | + | *'''Value''' – The Expression to be applied to the data in the Databox. The 'Tab' key can be used to navigate between cells. | |
− | + | *'''Cond?''' – This check box specifies whether the Expression is to be a Logical Assessment (Conditional) or a Transformation. If the check box is ticked, the expression is a Logical Assessment (Conditional) Expression. If it is un-ticked, the expression is a Transformation Expression. The box toggles directly between a checked and unchecked state, after it is initially set. | |
− | + | The Cond? check box needs to be set up in order to save an expression. It cannot be left as its default setting. The Cond? check box can NOT be changed if the expression is still referenced by existing scripts. | |
− | + | To remove an expression from the databox, selected the expression and click on the delete button once. | |
− | + | The removal of an Expression can only be undertaken if it is not referenced in any existing Scripts. You must also be logged in to the administration console as Exclusive Login. | |
− | |||
− | |||
− | |||
− | |||
− | |||
Revision as of 12:13, 22 February 2018
Contents
Expressions
When using databoxes within a Script you may wish to manipulate the data in the databox, combine it with data from another databox, or perform a conditional assessment on the data to decide which path in the script to take.
Each of these actions is performed by defining an Expression against the relevant Databox that will manipulate the data within it.
A full list of expressions used in Keyfax Inter•View can be found in Expressions.
An Expression can be written as either a Transformation or a Logical Assessment.
Transformation Expressions
Transformation expressions re-format the data within the databox. These are usually used when the core data stored in the databox needs to be pulled out in a different format or when the data needs to be mathematically manipulated.
Examples of a transformation are:
- Reading the value of text in a databox and putting it in UPPERCASE.
- Multiplying the data in a databox.
- Reading only the first 3 characters of the data held in a databox.
- Reading the contents of a databox and then adding it to the value held in another databox.
Logical Assessment Expressions
A logical assessment (conditional) expression assesses the data within a databox. The expression used in a logical assessment should return a True or False value.
Examples of a logical assessment are:
- Taking a particular path in a script if a databox value is greater than 10. If it is not greater than 10 then a different path is taken, as shown above.
- Changing the script set to be used if the user is set-up in a particular business group, this would be based on the information based in the import XML
- Taking a particular path in a script if the date is between the beginning of April and the end of November, for example winter months may increase the priority of some repairs.
Defining an Expression
Expressions are defined by editing the properties of the relevant Databox. Click on the plus button to add a new expression. This presents a new expression line that needs to be defined:
- Title – The Title for the Expression. The 'Tab' key can be used to navigate between cells.
- Value – The Expression to be applied to the data in the Databox. The 'Tab' key can be used to navigate between cells.
- Cond? – This check box specifies whether the Expression is to be a Logical Assessment (Conditional) or a Transformation. If the check box is ticked, the expression is a Logical Assessment (Conditional) Expression. If it is un-ticked, the expression is a Transformation Expression. The box toggles directly between a checked and unchecked state, after it is initially set.
The Cond? check box needs to be set up in order to save an expression. It cannot be left as its default setting. The Cond? check box can NOT be changed if the expression is still referenced by existing scripts.
To remove an expression from the databox, selected the expression and click on the delete button once.
The removal of an Expression can only be undertaken if it is not referenced in any existing Scripts. You must also be logged in to the administration console as Exclusive Login.