How To Set Min/Max Values for Date Type in Data Models
In Eccentex AppBase's MDM (Master Data Management) module, developers have the ability to add and set minimum and maximum values for Date data types. This feature allows you to enforce restrictions on the range of dates that can be entered for a specific attribute within the data model.
To set minimum and maximum values for Date data types in MDM, you can follow these steps:
Data Model: In the Data Model, navigate to the specific attribute representing the Date data type. Within the attribute settings, you can define the minimum and maximum values allowed for that attribute. For example, you can set a minimum date value of January 1, 2000, and a maximum date value of December 31, 2023.
Form Builder: When designing data entry forms, you can use the Date attribute and configure it to display a date picker or date input field. The minimum and maximum values defined in the Data Model will be reflected in the form, restricting the selectable dates within the specified range. Users can only choose dates that fall between the defined minimum and maximum values.
Search Builder: You can use the Date attribute as a filter criterion when searching for specific records in the Search Builder. The minimum and maximum values defined in the Data Model will be available as options to set search boundaries. This allows you to narrow down search results based on a specific date range.
By setting minimum and maximum values for Date data types in the Data Model, Form Builder, and Search Builder, you ensure data integrity and consistency within your application. This feature helps to prevent the entry of invalid or out-of-range dates and provides a convenient way to filter and search for records based on date criteria.
Data Model
- Navigate to Setup → Case Setup → Case Types
- Open the Case Type Data Model
- Select the Date Type field. In our example, the Valid Until field.
- In the Modify Attribute pop window, scroll down to find the Min Date Value and the Max Date Value settings. In our example, we set the Min date to two weeks before today (Days = -14), and the Max date to 6 months from now (Months = 6). You can check the Example Date fields showing the corresponding dates for this configuration.
Form Builder
- Navigate to Setup → Case Setup → Case Types
- Open the Case Type Data Model
- On the Forms tab, open the Form to add the Min/Max values.
- Edit the Date Type field properties to set the Min and Max Durations. In our example, the Valid Until field.
- Select the Date field (1), click on the property Min/Max Duration (2) and set the duration in the fields Years, Months, or Days (3). In our example, we set the Max Duration to 6 months.
- Save the Form.
- In runtime, the calendar will show unavailable dates below Min Duration. In our example, all dates are unavailable 15 days before or more than January 4th.
Search Builder
- Navigate to Setup → Case Setup → Case Types
- Open the Case Type Data Model
- On the Search tab, open the search form to add the Min/Max values.
- Edit the Date Type field properties to set the Min and Max Durations. In our example, the Valid Until field.
- Click on the field Min/Max Duration and set the duration in the fields Years, Months, or Days. In our example, we set the Max Duration to 6 months.
- In runtime, the calendar will show unavailable dates below Min Duration. In our example, all dates are unavailable 15 days before or more than January 4th.