Difference between revisions of "Before"
(Created page with "Checks if one date is before another date. ==Example One== ==Example Two== ==Example Three==") |
(→Demonstration) |
||
(11 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
==Example One== | ==Example One== | ||
+ | |||
+ | Two fixed values are compared. | ||
+ | |||
+ | [[File:beforefunction1.png]] | ||
+ | |||
+ | The date value of one databox '''CompanyData.Expressions.Date''' is written into '''Examples.Date''' and the expression '''BeforeDate Fixed date''' checks if '''CompanyData.Expressions.Date''' (15/10/2016) is before the value in the '''Examples.Date.BeforeDate Fixed''' (14/10/2016) expression | ||
+ | |||
+ | If true it'll display a message with True, if false then one with False. | ||
+ | |||
+ | ===Setup=== | ||
+ | |||
+ | [[File:beforefunction2.png]] | ||
+ | |||
+ | [[File:beforefunction3.png]] | ||
+ | |||
+ | ===Demonstration=== | ||
+ | |||
+ | [[File:beforefunction4.png]] | ||
+ | |||
+ | [[File:beforefunction5.png]] | ||
==Example Two== | ==Example Two== | ||
+ | |||
+ | Check if a fixed value is before a user entered value | ||
+ | |||
+ | The same as the above example but in this example, it checks if '''CompanyData.Expressions.Date''' is before a user entered date. The user enters a date into '''Script.Date01'''. '''CompanyData.Expressions.Date''' then writes 15/10/2016 into '''Examples.Date''' and is evaluated against the expression '''Before Date01''' | ||
+ | |||
+ | ===Setup=== | ||
+ | |||
+ | [[File:beforefunction6.png]] | ||
+ | |||
+ | [[File:beforefunction7.png]] | ||
+ | |||
+ | ===Demonstration=== | ||
+ | |||
+ | Fixed date '''15-10-2016''' is before user entered date '''Script.Date01 (17-10-2019)''' the result returns '''True''' | ||
+ | |||
+ | [[File:beforefunction8.png]] [[File:beforefunction9.png]] | ||
+ | |||
+ | Fixed date '''15-10-2016''' is not before user entered date '''Script.Date01 (14-10-2019)''' the result returns '''False''' | ||
+ | |||
+ | [[File:beforefunction10.png]] [[File:beforefunction11.png]] | ||
==Example Three== | ==Example Three== | ||
+ | |||
+ | Check if a user entered value A is before another user entered value B. As the examples above but this will compare two date values that are both user entered. | ||
+ | |||
+ | User enters dates into '''Script.Date01''' and '''Script.Date02'''. An expression '''Before Date01''' then runs against the value entered in '''Script.Date02''' and it returns true or false. | ||
+ | |||
+ | ===Setup=== | ||
+ | |||
+ | [[File:beforefunction13.png]] | ||
+ | |||
+ | [[File:beforefunction14.png]] | ||
+ | |||
+ | ===Demonstration=== | ||
+ | |||
+ | User entered date '''Script.Date02 (25-01-2015)''' is before user entered date '''Script.Date01 (03-05-2016)''' the result returns '''True''' | ||
+ | |||
+ | [[File:beforefunction15.png]] [[File:beforefunction16.png]] | ||
+ | |||
+ | [[File:beforefunction17.png]] | ||
+ | |||
+ | User entered date '''Script.Date02 (02-06-2019)''' is not before user entered date '''Script.Date01 (29-12-2018)''' the result returns '''False''' | ||
+ | |||
+ | [[File:beforefunction18.png]] [[File:beforefunction19.png]] | ||
+ | |||
+ | [[File:beforefunction20.png]] |
Latest revision as of 10:43, 25 April 2019
Checks if one date is before another date.
Contents
Example One
Two fixed values are compared.
The date value of one databox CompanyData.Expressions.Date is written into Examples.Date and the expression BeforeDate Fixed date checks if CompanyData.Expressions.Date (15/10/2016) is before the value in the Examples.Date.BeforeDate Fixed (14/10/2016) expression
If true it'll display a message with True, if false then one with False.
Setup
Demonstration
Example Two
Check if a fixed value is before a user entered value
The same as the above example but in this example, it checks if CompanyData.Expressions.Date is before a user entered date. The user enters a date into Script.Date01. CompanyData.Expressions.Date then writes 15/10/2016 into Examples.Date and is evaluated against the expression Before Date01
Setup
Demonstration
Fixed date 15-10-2016 is before user entered date Script.Date01 (17-10-2019) the result returns True
Fixed date 15-10-2016 is not before user entered date Script.Date01 (14-10-2019) the result returns False
Example Three
Check if a user entered value A is before another user entered value B. As the examples above but this will compare two date values that are both user entered.
User enters dates into Script.Date01 and Script.Date02. An expression Before Date01 then runs against the value entered in Script.Date02 and it returns true or false.
Setup
Demonstration
User entered date Script.Date02 (25-01-2015) is before user entered date Script.Date01 (03-05-2016) the result returns True
User entered date Script.Date02 (02-06-2019) is not before user entered date Script.Date01 (29-12-2018) the result returns False