Difference between revisions of "After"

From Keyfax Wiki
Jump to: navigation, search
(Example Two)
(Example Two)
Line 28: Line 28:
 
*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]]

Revision as of 10:01, 10 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 

Example One

Compare two fixed values. One value from a company databox and one value in an expression.

Afterfunction1.png

  • 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

Afterfunction5.png

Afterfunction6.png

Example Two

Compare a fixed value using a Company Databox against a user entered date in a Script Databox.

Afterfunction2.png

  • 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

Afterfunction7.png

Afterfunction8.png

Afterfunction9.png

Afterfunction10.png

Example Three

Example Four