Highlighted
Absent Member.. Whatev Absent Member..
Absent Member..
122 views

Validate Date Value

I am using JavaScript to check the date value of the planned.start date on a change ticket. It returns 'true' if the date has a time value of '00:00:00'. I am using object.yes.no in the subroutine of the cm3r formatctrl to ask is the user wants the 00:00:00 time or if they just forgot to enter the specifc time. This all works great as I am only prompted when the parsed date value = 00:00:00. The problem is I am trying to disable the Save of the ticket based on the response, so if the answer is "no" then the ticket does not save. I then added - if ($return.value="no") then ($L.action="do nothing") in the Save display option, but it seems the save occurs before this can be determined. I need to know how to make this work?? (Dont we all) Thank you very much for any help.

0 Likes
4 Replies
JD_Jinesta Outstanding Contributor.
Outstanding Contributor.

Re: Validate Date Value

Hi,

 

If you try $L.ds.action instead of $L.action, does the problem persists?

SM Support Engineer

Thank you for using the Micro Focus Community. If you find that this or any post resolves your issue, please be sure to mark it as an "accept as solution".
0 Likes
Absent Member.. Whatev Absent Member..
Absent Member..

Re: Validate Date Value

Yes, I actauly did use $L.ds.action. It was a typo. Same result also. Is there a way to use object.yes.no to stop an update to the change ticket? Is there another type of prompt maybe? Basically I want to say - do you want to save this ticket with the planned date as is, or make changes to it again before saving. So if they respond No then the ticket ignored the cm.save process.

0 Likes
JD_Jinesta Outstanding Contributor.
Outstanding Contributor.

Re: Validate Date Value

Hi,

 

Search for im.open.cancel or sd.open.cancel Process record (from Process Table), there is an example of the use of apm.mb.yes.no.1 which works similar to object.yes.no

 

I think you can implement the logic into your display option and make it work the way you want it

SM Support Engineer

Thank you for using the Micro Focus Community. If you find that this or any post resolves your issue, please be sure to mark it as an "accept as solution".
0 Likes
Absent Member.. Whatev Absent Member..
Absent Member..

Re: Validate Date Value

Very cool JD, thanks. I will take a look at.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.