Hi @rocky_puff ,
I ran a test this morning and picked up a few issues, but first some rules to help clarify;
A variable can be either global, or local - but not both, as this causes issues.
You can use Set(), or UpdateContext() to define ayo as true or false, but you shouldn't use both.
If you use Set(), ayo will be defined and accessible across the entire app - this is a global variable.
If you use UpdateContext(), ayo will be defined for the screen/page that you used it on, and will be specific to that page - this is a local variable.
In my example, we set gvarCurrentTime to global (so it can be accessed from anywhere in the app) and ayo to local, so it's specific to the screen in which the buttons appear.
In this scenario, we only need one timer, and we only need to use one event handler
Either OnTimerStart: or OnTimerEnd: - if you use both you may be using conflicting logic.
With the above in mind, the Timer2 logic has two issues. The first is your TimeValue() expression. To ensure this is right, add a text label to your screen and set it's Text: property to
TimeValue("1:47:00.000 PM")
On my side, this comes up blank - it only works if I remove the trailing .000, although this may be somehow influenced by regional settings. If it shows you the time then it's fine - if not, try remove the trailing .000
Once you can confirm the correct expression that gives you a Time value in your text label, copy the expression and remove the text label.
Then, it's important to realise that when we test conditions, the things we're testing must be of the same type - so when testing date/datetime/time functions, we need to ensure we're checking date vs date, datetime vs datetime or time vs time.
In my example above, I neglected to convert Now(), which is a datetime, to a time value - before comparing it to another time value. The TimeValue() converts text to time, which requires a text value to do this - so we have to first convert Now() to text so it can work with TimeValue(), then convert it to time to compare it to another TimeValue().
Try this on a single timer OnTimerEnd: instead (and remove all other logic or timers you may have);
Set(gvarCurrentTime, Now());
If((TimeValue(Text(gvarCurrentTime)) > TimeValue("01:47:00 AM")) && (TimeValue(Text(gvarCurrentTime)) < TimeValue("04:30:00 PM")), UpdateContext({ ayo: true }), UpdateContext({ ayo: false }))
The only other thing that needs to be configured is the button Visible: property being set to
ayo
Hope this helps,
RT