Input widget for intervals (=time durations)

Greetings.

I recently noticed that Tulip provides no native way to input a time duration in a user-friendly way. A customer of mine is making an app that displays operator worktimes. Sometimes operator forget to badge out which creates large durations and my customer would like to allow the app user to decide what duration is considered abnormal to filter our / display “outlier” worktimes.

The best thing I could come up with is to use an Number input in hours, convert the value to seconds and finally use SECONDS_TO_INTERVAL() to create an actual Interval value. In other use cases, one could also create several fields (for days, hours, minutes and seconds) and do the conversion but this would still be entirely manual.

I think it would be nice to have a native way to input an interval, e.g. with a widget containing days-hours-minutes-seconds fields and that would be linked to an Interval variable.

Hi Fabien,

I assume you mean something similar to below:


This can be done with a trigger like this:

An alternative would be to build a Custom Widget that formats lets enter time in format hh:mm:ss and turns it into an interval.

Can you confirm this is what you are looking for? If not, feel free to share more details and images to illustrate what your requirements is.

Regards,
Sébastien

@seb.lorandel That’s exactly what I meant indeed. One could also consider having a Days field or small ergonomic improvements too.

I’m perfectly aware this can be done with current Tulip features and it won’t be the highest prioritized item in the list ; I made this suggestion in case some people are interested in having this built-in / natively.