1) Give a description of the problem
Having problems with creating an expression with isEmpty to look at a DateTime List correctly to see if an item on the list is empty. The issue is on the every 1 minute section of the piston only if the tile doesn’t have an entry on the date/time list.
2) What is the expected behavior?
This expression should be displaying on the footer of the Piston Tile either No Event Yet if there’s no entry on the date/time list or display the Date/time using the provided format.
Expression I’m using is this:
isEmpty(tileTime[tile]) ? ‘No Event Yet’ : {formatDateTime(tileTime[tile], {DateTimeFormula})}
I’ve tried doing this expression a few ways and even reversed around the No Event Yet’ and the {formatDateTime(tileTime[tile], {DateTimeFormula})} sections.
3) What is happening/not happening?
Currently it’s displaying the current date/time whenever there’s no entry in the date/time list. I’ve tried the expression several ways and even in the Evaluation console the date/time lists display correctly.
Evaluation console showing the correct values for the list entry 1 and 3:
Date/Time List on variables section showing only 1 entry on number 3:
Piston Tiles, the Kitchen Window correctly shows correct time but the other tiles should be showing No Event Yet instead of the date/time:
4) Post a Green Snapshot of the piston
Note: I only set to 1 minute for the timer for testing only
5) Attach any logs (From ST IDE and by turning logging level to Full)
10/23/2017, 4:10:11 PM +519ms +0ms ╔Received event [Home].time = 1508789411593 with a delay of -75ms +400ms ║RunTime Analysis CS > 196ms > PS > 101ms > PE > 103ms > CE +415ms ║Runtime (55685 bytes) successfully initialized in 101ms (v0.2.0fa.20171011) (414ms) +416ms ║╔Execution stage started +440ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +459ms ║║Cancelling statement #208's schedules... +471ms ║║Calculating (integer) 0 + (integer) 1 >> (integer) 1 +476ms ║║Executed virtual command setVariable (3ms) +498ms ║║Calculating (string) closed == (string) open >> (boolean) false +517ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +526ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +530ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +547ms ║║Calculating (string) closed == (string) open >> (boolean) false +552ms ║║Executed virtual command setTile (1ms) +560ms ║║Cancelling statement #208's schedules... +573ms ║║Calculating (integer) 1 + (integer) 1 >> (integer) 2 +578ms ║║Executed virtual command setVariable (3ms) +601ms ║║Calculating (string) closed == (string) open >> (boolean) false +621ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +632ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +636ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +656ms ║║Calculating (string) closed == (string) open >> (boolean) false +662ms ║║Executed virtual command setTile (1ms) +674ms ║║Cancelling statement #208's schedules... +690ms ║║Calculating (integer) 2 + (integer) 1 >> (integer) 3 +695ms ║║Executed virtual command setVariable (3ms) +723ms ║║Calculating (string) closed == (string) open >> (boolean) false +743ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +752ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +756ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +773ms ║║Calculating (string) closed == (string) open >> (boolean) false +779ms ║║Executed virtual command setTile (2ms) +788ms ║║Cancelling statement #208's schedules... +802ms ║║Calculating (integer) 3 + (integer) 1 >> (integer) 4 +807ms ║║Executed virtual command setVariable (3ms) +829ms ║║Calculating (string) closed == (string) open >> (boolean) false +849ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +857ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +862ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +878ms ║║Calculating (string) closed == (string) open >> (boolean) false +883ms ║║Executed virtual command setTile (1ms) +892ms ║║Cancelling statement #208's schedules... +909ms ║║Calculating (integer) 4 + (integer) 1 >> (integer) 5 +914ms ║║Executed virtual command setVariable (2ms) +935ms ║║Calculating (string) closed == (string) open >> (boolean) false +956ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +964ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +968ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +984ms ║║Calculating (string) closed == (string) open >> (boolean) false +989ms ║║Executed virtual command setTile (1ms) +998ms ║║Cancelling statement #208's schedules... +1015ms ║║Calculating (integer) 5 + (integer) 1 >> (integer) 6 +1022ms ║║Executed virtual command setVariable (5ms) +1044ms ║║Calculating (string) closed == (string) open >> (boolean) false +1064ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +1072ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +1076ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +1093ms ║║Calculating (string) closed == (string) open >> (boolean) false +1098ms ║║Executed virtual command setTile (1ms) +1107ms ║║Cancelling statement #208's schedules... +1123ms ║║Calculating (integer) 6 + (integer) 1 >> (integer) 7 +1127ms ║║Executed virtual command setVariable (3ms) +1149ms ║║Calculating (string) closed == (string) open >> (boolean) false +1168ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +1176ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +1181ms ║║Calculating (boolean) false == (boolean) true >> (boolean) false +1197ms ║║Calculating (string) closed == (string) open >> (boolean) false +1202ms ║║Executed virtual command setTile (1ms) +1206ms ║║Cancelling statement #216's schedules... +1211ms ║║Executed virtual command setVariable (3ms) +1227ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1232ms ║║Cancelling statement #219's schedules... +1235ms ║║Executed virtual command clearTile (1ms) +1250ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1255ms ║║Cancelling statement #219's schedules... +1258ms ║║Executed virtual command clearTile (0ms) +1274ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1278ms ║║Cancelling statement #219's schedules... +1282ms ║║Executed virtual command clearTile (1ms) +1296ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1301ms ║║Cancelling statement #219's schedules... +1305ms ║║Executed virtual command clearTile (0ms) +1319ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1324ms ║║Cancelling statement #219's schedules... +1327ms ║║Executed virtual command clearTile (0ms) +1342ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1346ms ║║Cancelling statement #219's schedules... +1350ms ║║Executed virtual command clearTile (1ms) +1365ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1370ms ║║Cancelling statement #219's schedules... +1373ms ║║Executed virtual command clearTile (1ms) +1388ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1394ms ║║Cancelling statement #219's schedules... +1399ms ║║Executed virtual command clearTile (1ms) +1414ms ║║Calculating (integer) 7 + (integer) 1 >> (integer) 8 +1419ms ║║Cancelling statement #219's schedules... +1423ms ║║Executed virtual command clearTile (1ms) +1427ms ║╚Execution stage complete. (1010ms) +1428ms ║Setting up scheduled job for Mon, Oct 23 2017 @ 4:11:11 PM EDT (in 58.646s) +1494ms ╚Event processed successfully (1495ms)