Error trying to use arrayItem with indexOf

variables

#1

1) Give a description of the problem
I have been trying to populate a message using an array lookup.
If Switch 102 is selected, then the number 19800000 should appears in the message. or
If Switch 103 is selected then the number 21600000 should appears in the message, etc.

Tried doing a search of the Webcore Wiki and Forum but could not find something related.
What detail am I missing?

2) What is the expected behaviour?
Based on the switch chosen the message is sent the time value from a list

3) What is happening/not happening?
Getting message Array item index is outside of bounds

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
6/24/2023, 11:09:00 AM +507ms
+3ms ╔Received event [Wakeup1].switch = off with a delay of 39ms, canQueue: true, calledMyself: false
+14ms ║RunTime initialize > 13 LockT > 2ms > r9T > 3ms > pistonT > 1ms (first state access 5 m:8 5 8)
+17ms ║Runtime (8535 bytes) initialized in 3ms (v0.3.114.20230222_HE)
+18ms ║╔Execution stage started
+31ms ║║Comparison (enum) off changes_to (string) on = false (1ms)
+32ms ║║Comparison changes_to = false (event device/attr eXcluded)
+33ms ║║Comparison changes_to = false (event device/attr eXcluded)
+34ms ║║Comparison changes_to = false (event device/attr eXcluded)
+38ms ║║Condition #2 evaluated false (15ms)
+40ms ║║Condition group #1 evaluated false (condition changed) (17ms)
+44ms ║╚Execution stage complete. (25ms)
+49ms ╚Event processed successfully (46ms)
6/24/2023, 11:08:55 AM +500ms
+4ms ╔Received event [Wakeup1].switch = on with a delay of 64ms, canQueue: true, calledMyself: false
+49ms ║RunTime initialize > 48 LockT > 1ms > r9T > 38ms > pistonT > 36ms (first state access 5 m:9 5 43)
+79ms ║Runtime (8407 bytes) initialized in 38ms (v0.3.114.20230222_HE)
+82ms ║╔Execution stage started
+97ms ║║Comparison (enum) on changes_to (string) on = true (1ms)
+98ms ║║Comparison changes_to = false (event device/attr eXcluded)
+99ms ║║Comparison changes_to = false (event device/attr eXcluded)
+100ms ║║Comparison changes_to = false (event device/attr eXcluded)
+105ms ║║Condition #2 evaluated true (17ms)
+108ms ║║Condition group #1 evaluated true (condition changed) (20ms)
+120ms ║║Calculating (string)The time set is + (string)19800000 >> (string)The time set is 19800000
+188ms ║║Executed virtual command sendPushNotification (65ms)
+195ms ║╚Execution stage complete. (113ms)
+202ms ╚Event processed successfully (199ms)


#2

Ok I must have done a typo because as I was documenting this it worked.