New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.. Absent Member..
Absent Member..
1130 views

Enforce format

Hi,

 

I'm trying to make a custom field where an estimated time can be booked in a change. I want to enforce that the field can only be filled with an hour:minute value fi 02:15, but it won't work.

I tried the mask value in a date control, set it to hh:mm and hh,mm but nothing seems to be of influence. Also it should not be possible to enter charachter values, so i tried the decimal field, but there i cannot enforce it to only contain 5 chars max and i cannot get the colon sign in between.

Maybe someone here has a brilliant idea?

 

My version is hpsm 9.21

 

gr,

Ronald

0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

Hi,
I had seen threads on forum for almost same type of problem.
What I can suppose is that you can add the validation so that if user entered in wrong format and then save then error would be there to ask user to correct the format.

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hi,

 

Yes, you mean with format control? I can use that as a workaround yes, but it's a pity that the mask value cannot do what my interpertation of it means.

 

Thanks for your reply!

0 Likes
Absent Member.. Absent Member..
Absent Member..

On your form, use a datetime object from forms designer for your field.

In the property list of the datetime object, check the duration checkbox.

 

This will require that the SM duration format be entered: D HH:MM:SS

(days and seconds are optional when entering the data, so the user could type 02:00 and after save it will appear as 02:00:00. You might be able to mask this to not show seconds but I have not done so).

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hi John,

 

That is indeed a good option, it then does some better checking on the input. But the masking is something i don't get, but i now see that you have to use that field in conjunction with in and output conversion, but i can't find examples on how to use that...reading the help doesn't help anyone here.

 

gr,

Ronald

0 Likes
Highlighted
Absent Member.
Absent Member.

In terms of a solution, follow the feedback provided by John.

 

In order to manipulate how a date is viewed on-screen, the output.date RAD Application would be referenced in the Output Conversion property. The value in the Mask property is used by the output.date RAD Application to generate the desired output.

 

Unfortunately, the output.date RAD Application does not provide a "mask" for generating a duration/interval of time.

 

Note: While these properties can be useful, there is a performance impact similar to adding DVD and Virtual Joins.

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.