Using variables for between two dates

Is there a way to use a variable for a date that can then be used either as part of the rule trigger for a schedule OR as part of the rule conditions for "between two dates" or similar? @bravenel

Are you able to describe what you are trying to do?

Not at present, and you are the first to inquire about it. It's a pretty narrow use case; perhaps you could explain more. I recently looked into the possibility, but concluded that the use case was just too thin. There have to be simple ways to accomplish the test you want without this...

Sure - the use case is pretty simple: I have a rule that sets a door lock code on a certain date and automatically removes it on another date. I want to expose this functionality to lay users on one of the dashboards @bravenel

I'll have to think about this. One the one side, the dashboard, it may be as simple as offering a date or date/time tile template. A time variable actually uses a Java date string under the covers, so a date could be put in that. On the other side, RM would have need of an extension in the date input contexts to allow use of a variable. This would be tantamount to changing the semantics of a time variable from time only, as it is now, to date/time and allow time variables to be used in date contexts. To complete the circle, there would need to be a way to set a date or date/time into a time variable.

What if you had a separate date string that didnt include time?

It all depends on the context and what you intend. For example, is there a specific or default time for something that happens on a certain date. The fact that a java time string includes both date and time parts doesn't mean that the context specific interpretation pays attention to both parts. For example, when a time is entered for "Certain Time" trigger, the internal string includes a date, but only the time part goes into the scheduler.

We're looking at the Dashboard templates to start, and there is a small UI issue for apps. I think we'll be able to do this, but have some work to do...

Ok sounds promising!. I was going to set a periodic schedule every day at 00:001 to check the dates and see if the new date was within the dates specified - but I could see this also being done another way where a particular date/time is entered and the rule waits for that as a condition to be true...

tbh I'm not too fussed how it works as long as there is a way to do it - and the dashboard interface for the date variable is nice and easy to use for people (maybe for e.g. on mobile it invokes the native calendar date selector instead of the keyboard, which I believe is possible to do from web)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.