I am creating a prompt set that will ask the user to enter a
timeout value. A typical timeout value might be on the order of between 10 or so minutes and 24 hours, so I thought that it would make sense to let the user enter the timeout value in
hours and minutes.
I added a
Time/Date element to the prompt set, and selected the
Data Reference UC_DATATYPE_TIME. This is a predefined static VARA with
Data Type Time and
Output format hh:mm. In my tests, it worked well. I entered values such as 00:15 (fifteen minutes), or 02:30 (two and a half hours), and the values set by the prompt set were as expected.
Then I gave the object to a user for testing. He immediately ran into problems and I learned that the reason was that in his AWI Settings, he had the Time Display set to
12-hour AM/PM format. As a result, the default values of 00:15 was being displayed for him as "12:15 AM". I did not see this behavior in my initial tests, because my Time Display setting was set to
24-hour format. The display of this field as a time of day with an AM or PM suffix would be very confusing for users, because it implies a specific
time of day instead of a
duration.
I looked at the various
Date and time data types, and saw that there is on called
MM:SS that is certainly a duration. However, I found no time format for a duration in hours and minutes. I see a few problems with this:
- The AE provides no way to distinguish between a time of day in HH:MM format and a duration in hours and minutes. Internally, the AE treats the two indistinguishably.
- The AWI assumes all HH:MM-formatted fields are times of day, and formats them accordingly based on the user's AWI Time Display setting.
It would be preferable if the AE provided
separate data types for durations and times of day. Until such an enhancement is delivered, it would be good if the documentation described the aforementioned behavior more clearly.
For what it's worth, I will change the type of this prompt set field to
Number (integer), and ask the user to enter the timeout in minutes.