Context: All my pages update their current date and time every second to update with the current date and time. In the screenshot below, A pop occurs when ‘Homepages Time’, formatted as 08:00:00 is converted to a number, and reads a certain time, like ‘080500’ (5 minutes past 8 am) which then it will open the pop up to that desired time. I would like this to happen every 30 minutes, and exclude certain times like ‘100000’ (10:00 am), but obviously it would end up being a very long Only When condition to do this for every 30 minutes for 24 hours, 7 days a week.
Is there anyway I can shorten this Only When condition? Would an entirely different method be applicable?
Cheers!
Note: Even though the converted number below reads 82100, its just not including the 0 in front of it for 082100 (08:21:00), but still works as intended.
Edit: Furthermore, you can see 2 times are included below for the pop up to open, ‘82100’ (08:21:00) and ‘82200’ (08:22:00) The pop up luckily opens for both of these times so all is working as intended (It is also 1 minute apart as I was testing if it worked). Hence why I want to shorten this only when condition then typing a whole load of times for this pop up to occur.
As a wild idea - maybe find a divider that will always give modulo zero for results when you want to have the trigger go?
So if you divide by 15 it will only work for numbers which have 00, 15, 30, 45 and 60. Haven’t tested that though.
Sounds like a good idea, but would not be sure how to implement it to be honest. At most I feel like I get up to the point of converting it to a number and dividing it by 15 then modulo 0?
I would suggest creating an Option Set which contains all of the numbers that satisfy the condition, and then checking if the time converted to a number is in the Option Set.
An example of how to construct this condition is below. The main thing is that you want to use the is in operator and iterate the options by selecting :each items X (where X is the Option Set’s number field).
So I have tried your method, only issue is the pop up keeps coming up. Not sure why, here is what I have don (note I am not the best with option sets).
Can see the live time is beyond what I put in the option set but still keeps coming up
Edit: I removed the times of the option sets, then it stopped popping up, then I added one for 6 am and the pop up keeps coming up even though its 1 pm here.
Yes I didn’t realise I had to modify the attribute to change its time value, but it kind of seems to work. Only issue I have no is that its taking the first option set but not doing the second one, (I would set the second one 30 seconds later than the first one, but it doesn’t show up).
I found out what was the issue of why it was not moving to the next attribute, its because my ‘Do when condition is true’ was set to only once rather than every time.
Your solution is absolute brilliance thank you so much for the help!