Question
Rulesware LLC
SV
Last activity: 22 Mar 2019 9:28 EDT
Specific Hour:Minutes:AM/PM required value request
Good day,
I have a request to capture an specific time with format HH:mm AM/PM. I'm using Date time control with display mode "Dropdowns lists", however when I select in UI just the AM or PM, it allows me to pass without setting the hour or the minutes, I need to have the 3 values. Please advice, I'm using Pega Infinity 8.
see atached image.
***Edited by Moderator Marissa to update platform capability tags****
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
You can also use the regular expression in your java code to match the string format something like \d+\:\d+ [a-zA-Z]{2} this might work for your scenario to match 12:14 AM or 1:12 AM or 1:2 AM,..
Pegasystems Inc.
US
Hello Hector,
After looking into your screenshot noticed 3 drop down list boxes for the field which means that you might have provided 3 properties to store its dropdown selected value. If that's the case then you need to add the validation on those 3 fields as mandatory, if not can you please share the design time configuration screenshots for these 3 drop down fields along with your validations.
Regards,
Mahesh M
-
SaiKishore Yagnamurthy
Rulesware LLC
SV
Hi Mahesh,
Thank you, actually is the form of presentation of the control, I'm ataching the options that I just set in the presentation.
Rulesware LLC
SV
Any Advice?
Pegasystems Inc.
IN
Hi,
I checked the behaviour and it is same as you stated.
To avoid the form submit, make it required as always , then you have to select all the dropdown for submiting the form.
Rulesware LLC
SV
Good day Sahuv1,
I tried your suggestion, but didn't work, wont require third dropdown (the one with AM/PM).
Let me know if you have a diferent approach.
Thank you.
Pegasystems Inc.
US
Hi Hector,
I don't find any OOTB way you can try to make it required because if you choose the value of all the 3 fields then it will be stored as "2:02 AM" format in the clipboard. Let say if you choose either Hours/Minutes/(AM/PM) the property value will not be empty, so i would suggest you to write a simple edit validate rule to cross check whether the property holds this format value (HH:MM AM/PM). This way you can make sure the user choose all the field values with a simple java code.
Hope this might help you.
Regards,
Mahesh M
Accepted Solution
Pegasystems Inc.
US
You can also use the regular expression in your java code to match the string format something like \d+\:\d+ [a-zA-Z]{2} this might work for your scenario to match 12:14 AM or 1:12 AM or 1:2 AM,..
Rulesware LLC
SV
Good day Mahesh,
Thank you, I will go with your suggested approach, I'll let you know the outcome.
Rulesware LLC
SV
In the end, I used 3 dropdowns with local values and capture all with a Data Transform.
Thank you all for the advice and help.