Difference between revisions of "After"
From Keyfax Wiki
(→Example Two) |
(→Example Four) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
[[File:afterfunction5.png]] | [[File:afterfunction5.png]] | ||
+ | |||
+ | ===Demonstration=== | ||
[[File:afterfunction6.png]] | [[File:afterfunction6.png]] | ||
Line 28: | Line 30: | ||
*Read '''CompanyData.Expressions.Date (15-10-2016)''' and write into '''Examples.Date''' | *Read '''CompanyData.Expressions.Date (15-10-2016)''' and write into '''Examples.Date''' | ||
*Run expression '''Examples.Date.After Date01''' to check if 15-10-2016 is after the user entered date | *Run expression '''Examples.Date.After Date01''' to check if 15-10-2016 is after the user entered date | ||
+ | |||
+ | ===Setup=== | ||
[[File:afterfunction7.png]] | [[File:afterfunction7.png]] | ||
+ | |||
+ | ===Demonstration=== | ||
[[File:afterfunction8.png]] | [[File:afterfunction8.png]] | ||
Line 38: | Line 44: | ||
==Example Three== | ==Example Three== | ||
+ | |||
+ | Compare two user entered dates in Script Databoxes. | ||
+ | |||
+ | [[File:afterfunction3.png]] | ||
+ | |||
+ | *User enters date and writes it into '''Script.Date01''' | ||
+ | *User enters date and writes it into '''Script.Date02''' | ||
+ | *Script.Date02 is written into '''Examples.Date''' | ||
+ | *Run expression '''Examples.Date.After Date01''' check if '''Script.Date02''' is after '''Script.Date01''' | ||
+ | |||
+ | ===Setup=== | ||
+ | |||
+ | [[File:afterfunction7.png]] | ||
+ | |||
+ | ===Demonstration=== | ||
+ | |||
+ | [[File:afterfunction11.png]] | ||
+ | |||
+ | [[File:afterfunction12.png]] | ||
+ | |||
+ | [[File:afterfunction13.png]] | ||
==Example Four== | ==Example Four== | ||
+ | |||
+ | Compare todays date against a user entered date in a Script Databox. | ||
+ | |||
+ | [[File:afterfunction4.png]] | ||
+ | |||
+ | *User enters date into '''Script.Date01''' | ||
+ | *Run expression '''SystemValue.DateChecks.After''' to see if today is after the user entered date. | ||
+ | |||
+ | ===Setup=== | ||
+ | |||
+ | [[File:afterfunction14.png]] | ||
+ | |||
+ | ===Demonstration=== | ||
+ | |||
+ | [[File:afterfunction15.png]] | ||
+ | |||
+ | [[File:afterfunction16.png]] |
Latest revision as of 10:25, 25 April 2019
After compares two dates and checks if the first is after the second. There are various ways this can be used in the scripts. Here are four examples of how.
These examples are available in the model scripts database
Contents
Example One
Compare two fixed values. One value from a company databox and one value in an expression.
- Read CompanyData.Expressions.Date (15-10-2016) and write into Examples.Date
- Run expression Examples.Date.After 14-10-2016 to check if it is after 14-10-2016
- Display message to the user telling them if this is true or false.
Setup
Demonstration
Example Two
Compare a fixed value using a Company Databox against a user entered date in a Script Databox.
- User enters date into a date question and it is written into Script.Date01
- Read CompanyData.Expressions.Date (15-10-2016) and write into Examples.Date
- Run expression Examples.Date.After Date01 to check if 15-10-2016 is after the user entered date
Setup
Demonstration
Example Three
Compare two user entered dates in Script Databoxes.
- User enters date and writes it into Script.Date01
- User enters date and writes it into Script.Date02
- Script.Date02 is written into Examples.Date
- Run expression Examples.Date.After Date01 check if Script.Date02 is after Script.Date01
Setup
Demonstration
Example Four
Compare todays date against a user entered date in a Script Databox.
- User enters date into Script.Date01
- Run expression SystemValue.DateChecks.After to see if today is after the user entered date.