Making date comparisons
This section describes how to make comparisons based on dates.
- Open the form for which you want to create a shortcut to a related form.
-
For M3: Click Tools > Personalize > Create Conditional Styles
For Lawson: Click Tools > Personalization > Conditional Styles.
- On the Create Conditional Styles dialog box, click New to create a new style.
-
On the Create Condition dialog box, make selections
for the items in the sub-steps that follow.
If the field shown by default is not the one you want to work with, select Target Field.
- Select Date from the Condition Type drop-down list.
-
Select Operator.
For date comparisons, the operators are similar to traditional operators (such as, less than, greater than, and equal to) but are specific to dates. For example, you can select Earlier than, Later than, Earlier than or equal to and so on.
-
Select the type of date comparison.
Option Meaning Field If you are comparing the target field to another date field, leave the default, Field, selected and then, in the adjacent drop-down menu, select the date field you want to compare to the target. Specific Fixed Dates If you are comparing the target field to a specific date or dates, select Specific Fixed Dates and then click the Select Dates button.
On the Select Dates dialog box, use the date picker calendar to select the dates you want to use in the comparison. (You can also remove dates on this dialog box.)
Click Next when you are finished making comparisons. You will be on the Work with Formatting dialog box which is for making visual changes to the appearance of fields.
See Making formatting changes to affect the display of a field.
Dynamic Dates Use this option to select a range of dates to be used for the comparison. When you select Dynamic Date, the Set Date Interval button appears.
If you want the style to be used any time the condition is met, you do not need to do anything further. Click Next format the style visually.
If you want to specify when the style should be applied, click the Set Date Interval button.
Details about setting the interval are in another section.
Specific Dynamic Dates Use this option to start the interval on a specific date. In this case, you will specify both a specific date or dates and a date range.
Here is an example of why you might use this set of options. Suppose you want to run a report three days prior to the last Friday of the month. Because the last Friday of the month is not a fixed date, you would use the Specific Date section of the dialog box to select the last Fridays of each month. Then you would use the Dynamic Date section to specify the third day before each last Friday.
Information about how to specify a date range is in another section.
Expression Use this option to set up a condition using date tokens. These tokens are variables that represent date values. When you right-click the field adjacent to the "Expression" option, a context menu appears and will allow you to choose among the available tokens:
-
[currentdate]
-
[currentmonth]
-
[currentyear]
Suppose you want to filter Lawson Transaction forms that will expire today. To make these forms stand out, you can compare the target field against a token expression. For example, the maturity date (target field) is equal (=) to the [currentdate] (token expression).
Click Next when you are finished making comparisons. You will be on the Work with Formatting dialog box which is for making visual changes to the appearance of fields.
See Making formatting changes to affect the display of a field.
+ Click + to add another condition or click - to remove an existing condition). -