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
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.
Assign Kudo, if found post useful and mark it accepted if solves the issue.
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!
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).
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.
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.