Return to main navigation Page
The Date type attribute lets you define and use dates in Search and Configuration flows. Date attributes can be created at all levels of the product hierarchy, just like other configurable attributes.
All date attribute properties can be defined as they would on a text field type configurable attribute, including Set Type, Auto Update, Hidden, Required, Hide in Transaction, and Status.
Another major feature is the ability to define a Range Check on dates.
The date attribute is displayed as a text box with a date selector tool. This gives the user the option to either enter a date manually or select one from the calendar. An automatic validation runs to ensure that the date complies with the application and user profile information.
Date attributes can be of array or non-array type. Date arrays cannot be displayed as menus.
Accessing the Date Attribute Editor Page
Navigate to the Configurable Attributes Administration List page.
Click Admin to go to the Admin Home Page.
Click Catalog Definition in the Products section.
The Supported Products page appears.
In the Navigation column, select Configurable Attribute and then click List.
The Configurable Attributes Administration List page appears.
Click the name of an attribute with Date in the Attribute Type column, or create a new attribute.
The Date Attribute Editor page appears.
Using the Date Attribute Editor Page
The Date Attribute Editor page has the following sections under the General tab: Main Information, Properties, and Default Data.
Enter a Description.
If Help Icon is checked for the attribute in the Configuration Flow Editor, the description appears when the user hovers over the help icon.
For more information, see Configuration Flows.
Active An attribute that is active will appear to the buyer and/or be included in rules.
All attributes are active by default.
Click Show Start/End Dates to specify how long the attribute will remain in the chosen status.
Use in Configuration Rules
Users will be able to use Date Attributes as simple and advanced condition attributes within all Configuration rules. Dates can be used in the Condition, Action, Condition Input, and Action Input like other configurable attributes. In addition, Recommendations and Constraints defined on Date Attributes return Date objects.
The following operators are available when data attributes are used in simple conditions:
Recommendations rules are used to recommend values for non-array and array dates. Set type for recommendations work the same way for dates as they do for all other configurable attributes. User can use date attributes within Recommendation rules which can be used to set the value of date attributes. Uses can do this by either entering date values or using BML. If using BML, the return data type would be: date.
If a date is constrained, it will be shown as grayed-out in the date picker and CPQ Cloud will throw a constraint message. To create a simple constraint on a date attribute, enter a single date or a date range to constrain.
To constrain multiple dates, define a BML function and return an array with a new data type: Date. When doing this, every date within the array will be constrained on the user side.
Configuration and Search Flows
In Configuration and/or Search flows, dates can be displayed in the default and advanced templates.
Dates in Function to return a Result Set – In the function to evaluate result set, the Date attribute has to be passed in the db date format. (string format)
//Snippet for passing dates into the Function to return a Result Set
str = str + "<AttributeVariableName=\"simpleDate"\"> + (datetoStr(simpleDate, "yyyy-MM-dd hh:mm:ss"));
Array Dates in Functions to return a Result Set - In
the function to evaluate result set, the date array has to be passed
//Snippet for passing date arrays in the Function to return a Result Set
str = str + "<Attribute VariableName=\" arrayDateCurrentDateAsDefault\>'
+ getarrayattrstring(array DateCurrentDateAsDefault) + "<\Attribute>";
While reading values of date attributes, the FullAccess user performs an isnull check to avoid errors.
Date attributes are supported in Bulk Upload and Download.
Date attributes are supported inthe Configuration SOAP API in the database format [yyyy-MM-dd 00:00:00].
However, a user cannot set a time component for dates through SOAP. All dates are set with the time component as 00:00:00.
Have as few attributes "auto-update" as possible.
Dates in Configuration do not support time.