Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

Restrict Date Entry on a Variable in a Catalog Item

terrieb
Tera Guru

We have a catalog item that has the variable type of date and the question is Start Date.  

 

We are trying to prevent anyone from inputting today's date as the start date.

 

We have tried the following to prevent this:

 

UI Policy where date can't be at or before today

On the ui Action on the dictionary override record, deselected the mandatory override

Both the UI action and the Variable is set to Mandatory

 

While it works, it only works if someone clicks on that field.  The mandatory symbol does not show up unless they do so and if they try to put in today's date, it won't allow them to submit the request

 

However, if they skip that field, the mandatory symbol does not show up and they can submit the request with that field blank

 

This is critical information so if anyone else has a way to resolve this, we would greatly appreciate it.

 

Thanks!

8 REPLIES 8

I didn't make any changes to the existing UI (see below).  When I tried to do the 2nd option, it still didn't make the field mandatory.  We tried the date default value before you responded and it worked.

 

Created the addt'l UI Policy and made it before the existing one as recommended.

terrieb_1-1785765683390.png

 

The existing UI Policy had the condition that it could not be before or at Today

terrieb_2-1785765753917.png

 

However, a request was still being created without inputting a date in that field and it wasn't marked Mandatory.

 

I even tried updating the dictionary over write, and that didn't work either.

 

That is why I posted this on Community to begin with to find a permanent solution.

 

 

 

 

Hello @terrieb , Screenshots are blurred so couldn't make much out of it. However, please ensure that new policy executes after the existing one( where you validates the date).

I'm online and we'll get this fiexd.

 

Regards,

Nishant

 

The new one to not have that date be blank is like this:

 

Condition:  start_date is not empty

On Load

Order 100

 

2nd UI Policy/Action

 

Condition:  start_date at or before today

On Load

Order 200

 

UI Action:  

Mandatory: True

Visible: Leave Alone

Read Only: Leave Alone

Value Action:  Clear Value

Field Message type: Error

Field Message:  Has to be a date after today's date

 

I tried making the Variable with Mandatory selected and deselected.

 

 

Please make the changes as following:

New one:

Condition:  start_date is empty

Order: 300

On Load and Reverse if false selected

UI Action:

Mandatory: True

Visible: Leave Alone

Read Only: Leave Alone

-------------------------

2nd UI Policy/Action (Your existing one):

Condition:  start_date at or before today

On Load and Reverse if false selected

Order: 200

UI Action:  

Mandatory: Leave Alone

Visible: Leave Alone

Read Only: Leave Alone

Value Action:  Clear Value

Field Message type: Error

Field Message:  Has to be a date after today's date