I have created a page variable named LevelsStandard where Variable value type = List and List item type = Object.
Each object has several properties, including ‘End’, ‘Start’, and ‘Level’…all with Variable value type = number.
The ‘End’ and ‘Start’ values will ultimately reference a timer so are in milliseconds, so my first three objects are;
Start = 0, End = 8471, Level = 1
Start = 8472, End = 16942, Level 2
Start = 16943, End = 25413, Level 3
I am trying to build a formula that references ‘End’ and ‘Start’ to pullback the level. The crucial point is that the formula will reference a timer that I have constructed using the below formula:
DATETIME_DIFFERENCE(appVars.TimeNow,pageVars.TimerStart)
What I have so far is below;
REDUCE(pageVars.LevelsStandard, IF(item.Start<TIMER FORMULA < item.End, item.Level,“unknown”))
At the moment, I am testing using a static number for the TIMER FORMULA and I can get the correct level to pull back. So if I add in 17000, the formula pulls back 3.
But when I replace the TIMER FORMULA with DATETIME_DIFFERENCE(appVars.TimeNow,pageVars.TimerStart), it doesn’t work…which makes me think the REDUCE formula wont work with the dynamic nature I am seeking.
Thanks
Paul