Create a date and nullable date variable
Use the Date and Nullable date variable to set the date in a process or business rule.
You can use @Today macro to get the current date, or a past/future date by adding or subtracting the number of days. For example, to get the date 7 days before the current date, specify the variable value as @Today-7.
When you create a job on a process, or use a business rule that is using @Today, at runtime, the value of the variable is displayed as current date, or current date + (plus) or - (minus) the number of days specified (if any).
When you create a job on a process that has an initialization variable using @Today, the runtime value of the variable is displayed as the current date, or current date + (plus) or - (minus) the number of days specified (if any). The time is set to 12 AM at runtime. However, you can change the date and time, as required.
- Open the process map in which to create the variable.
-
On the process modeling bar, click
Variables and click
New.
The New variable dialog box is displayed.
-
Enter a unique
Name for the variable.
By default, the name of the variable becomes the ID of the variable; however, you can change the ID if needed.
- On the Type list, select Date or Nullable date. (Default: String)
- Optional. To use the variable for process initialization, select Initialization.
-
To enter a
Value, do either of the following:
-
Static: You can set the Date variable value either by selecting the required date and time using the Calender picker or by clicking fx and using the @Today macro to get the current date or past/future date. For example, to set the date as 5 days from the current date, set the value as @Today+5.
When you create a job on a process, or use a business rule that has a date variable using @Today, at runtime, the value of the variable is displayed as current date, or current date + (plus) or - (minus) the number of days specified (if any).
When you create a job on a process that has an initialization variable using @Today, the runtime value of the variable is displayed as the current date, or current date + (plus) or - (minus) the number of days specified (if any). The time is set to 12 AM at runtime. However, you can change the date and time, as required.
-
Expression: Right-click in the rule editor box to enter an expression using process or server variables or functions.
-
- For Variable display properties, enter the minimum and maximum dates using calendar picker.
-
Click
Add.
On generating a Create new job or activity forms for a process that has an initialization variable set with display properties, the configured properties are reflected in the corresponding controls added to the form.
Note-
This applies to capture and non-MFP forms only.
-
The Control type property does not apply to business rule or custom services as they do not have forms associated with them.
The date variable appears on the Variables page. -