UI-Template msg.payload handling (Solved)

I am trying to use an array sent as msg.payload in a ui_template node - have looked everywhere but can't quite figure this out. I am creating a HTML table in the ui_template node, its for scheduling - I want to be able to populate it from an array that I am inputting, but I also need to output the data when altered back to the array which is stored in persistent context. I have the table and everything working - including exporting the data to the context store, but am having problems to import the data in.

I am passing the array to the ui_template from a function;

var currSched = flow.get("curr_sched");
msg.payload = flow.get(currSched);
return msg;

I am using scope function to export the array of values;

theScope = scope;
(function(scope) {
    scope.$watch('msg.payload', function(data) {
        update(data);
    });
})(scope);

with this command;

theScope.send({payload:arrTbl});

This is working fine, but I can't figure out how to populate the table with the data - how do I use the incoming msg.payload array? I would like to populate the cells I need with this command;

document.getElementById('this_element').value = msg.payload[0];

but of course that doesn't work - I know I need to use the 'scope' function somehow but not sure how.

see the flows library for inspiration (several of the examples are close to what you need - at least for clues)

I finally got this working - took a lot of trial and error and looking at other flows - so I thought I would post the working flow in case it helps someone else.

[{"id":"64acf673.201118","type":"ui_template","z":"e48251f5.5dd04","group":"af34c073.cf389","name":"myTable","order":1,"width":30,"height":13,"format":"<style type=\"text/css\">\n.tg  {border-collapse:collapse;border-color:#ccc;border-spacing:0;margin:0px auto;}\n.tg td{background-color:#fff;border-color:#ccc;border-style:solid;border-width:1px;color:#333;\n  font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;word-break:normal;}\n.tg th{background-color:#f0f0f0;border-color:#ccc;border-style:solid;border-width:1px;color:#333;\n  font-family:Arial, sans-serif;font-size:14px;font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}\n.tg .tg-baqh{text-align:center;vertical-align:top}\n.tg .tg-0vih{background-color:#f9f9f9;font-weight:bold;text-align:center;vertical-align:top}\n.tg .tg-6t95{font-weight:bold;position:-webkit-sticky;position:sticky;text-align:center;top:-1px;vertical-align:top;\n  will-change:transform}\n.tg .tg-dzk6{background-color:#f9f9f9;text-align:center;vertical-align:top}\n.tg .tg-amwm{font-weight:bold;text-align:center;vertical-align:top}\n@media screen and (max-width: 767px) {.tg {width: auto !important;}.tg col {width: auto !important;}.tg-wrap {overflow-x: auto;-webkit-overflow-scrolling: touch;margin: auto 0px;}}</style>\n<div class=\"tg-wrap\"><table class=\"tg\" style=\"undefined;table-layout: fixed; width: 1186px\" id=\"myTable\">\n<colgroup>\n<col style=\"width: 45px\">\n<col style=\"width: 60px\">\n<col style=\"width: 120px\">\n<col style=\"width: 120px\">\n<col style=\"width: 120px\">\n<col style=\"width: 120px\">\n<col style=\"width: 120px\">\n<col style=\"width: 120px\">\n<col style=\"width: 120px\">\n<col style=\"width: 120px\">\n<col style=\"width: 120px\">\n</colgroup>\n  <tr>\n    <th class=\"tg-6t95\">ID</th>\n    <th class=\"tg-6t95\">On/Off</th>\n    <th class=\"tg-6t95\">Monday</th>\n    <th class=\"tg-6t95\">Tuesday</th>\n    <th class=\"tg-6t95\">Wednesday</th>\n    <th class=\"tg-6t95\">Thursday</th>\n    <th class=\"tg-6t95\">Friday</th>\n    <th class=\"tg-6t95\">Saturday</th>\n    <th class=\"tg-6t95\">Sunday</th>\n    <th class=\"tg-6t95\">Holiday1</th>\n    <th class=\"tg-6t95\">Holiday2</th>\n  </tr>\n  <tr>\n    <td class=\"tg-0vih\">1</td>\n    <td class=\"tg-dzk6\">On</td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"mon1\" value=\"{{msg.payload[0]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"tue1\" value=\"{{msg.payload[1]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"wed1\" value=\"{{msg.payload[2]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"thu1\" value=\"{{msg.payload[3]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"fri1\" value=\"{{msg.payload[4]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"sat1\" value=\"{{msg.payload[5]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"sun1\" value=\"{{msg.payload[6]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"hol1_1\" value=\"{{msg.payload[7]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"hol2_1\" value=\"{{msg.payload[8]}}\"></td>\n  </tr>\n  <tr>\n    <td class=\"tg-amwm\">2</td>\n    <td class=\"tg-baqh\">Off</td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"mon2\" value=\"{{msg.payload[9]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"tue2\" value=\"{{msg.payload[10]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"wed2\" value=\"{{msg.payload[11]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"thu2\" value=\"{{msg.payload[12]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"fri2\" value=\"{{msg.payload[13]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"sat2\" value=\"{{msg.payload[14]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"sun2\" value=\"{{msg.payload[15]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"hol1_2\" value=\"{{msg.payload[16]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"hol2_2\" value=\"{{msg.payload[17]}}\"></td>\n  </tr>\n  <tr>\n    <td class=\"tg-0vih\">3</td>\n    <td class=\"tg-dzk6\">On</td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"mon3\" value=\"{{msg.payload[18]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"tue3\" value=\"{{msg.payload[19]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"wed3\" value=\"{{msg.payload[20]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"thu3\" value=\"{{msg.payload[21]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"fri3\" value=\"{{msg.payload[22]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"sat3\" value=\"{{msg.payload[23]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"sun3\" value=\"{{msg.payload[24]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"hol1_3\" value=\"{{msg.payload[25]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"hol2_3\" value=\"{{msg.payload[26]}}\"></td>\n  </tr>\n  <tr>\n    <td class=\"tg-amwm\">4</td>\n    <td class=\"tg-baqh\">Off</td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"mon4\" value=\"{{msg.payload[27]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"tue4\" value=\"{{msg.payload[28]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"wed4\" value=\"{{msg.payload[29]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"thu4\" value=\"{{msg.payload[30]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"fri4\" value=\"{{msg.payload[31]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"sat4\" value=\"{{msg.payload[32]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"sun4\" value=\"{{msg.payload[33]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"hol1_4\" value=\"{{msg.payload[34]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"hol2_4\" value=\"{{msg.payload[35]}}\"></td>\n  </tr>\n  <tr>\n    <td class=\"tg-0vih\">5</td>\n    <td class=\"tg-dzk6\">On</td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"mon5\" value=\"{{msg.payload[36]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"tue5\" value=\"{{msg.payload[37]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"wed5\" value=\"{{msg.payload[38]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"thu5\" value=\"{{msg.payload[39]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"fri5\" value=\"{{msg.payload[40]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"sat5\" value=\"{{msg.payload[41]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"sun5\" value=\"{{msg.payload[42]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"hol1_5\" value=\"{{msg.payload[43]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"hol2_5\" value=\"{{msg.payload[44]}}\"></td>\n  </tr>\n  <tr>\n    <td class=\"tg-amwm\">6</td>\n    <td class=\"tg-baqh\">Off</td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"mon6\" value=\"{{msg.payload[45]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"tue6\" value=\"{{msg.payload[46]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"wed6\" value=\"{{msg.payload[47]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"thu6\" value=\"{{msg.payload[48]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"fri6\" value=\"{{msg.payload[49]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"sat6\" value=\"{{msg.payload[50]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"sun6\" value=\"{{msg.payload[51]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"hol1_6\" value=\"{{msg.payload[52]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"hol2_6\" value=\"{{msg.payload[53]}}\"></td>\n  </tr>\n  <tr>\n    <td class=\"tg-0vih\">7</td>\n    <td class=\"tg-dzk6\">On</td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"mon7\" value=\"{{msg.payload[54]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"tue7\" value=\"{{msg.payload[55]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"wed7\" value=\"{{msg.payload[56]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"thu7\" value=\"{{msg.payload[57]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"fri7\" value=\"{{msg.payload[58]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"sat7\" value=\"{{msg.payload[59]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"sun7\" value=\"{{msg.payload[60]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"hol1_7\" value=\"{{msg.payload[61]}}\"></td>\n    <td class=\"tg-dzk6\"><input type=\"time\" id=\"hol2_7\" value=\"{{msg.payload[62]}}\"></td>\n  </tr>\n  <tr>\n    <td class=\"tg-amwm\">8</td>\n    <td class=\"tg-baqh\">Off</td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"mon8\" value=\"{{msg.payload[63]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"tue8\" value=\"{{msg.payload[64]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"wed8\" value=\"{{msg.payload[65]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"thu8\" value=\"{{msg.payload[66]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"fri8\" value=\"{{msg.payload[67]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"sat8\" value=\"{{msg.payload[68]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"sun8\" value=\"{{msg.payload[69]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"hol1_8\" value=\"{{msg.payload[70]}}\"></td>\n    <td class=\"tg-baqh\"><input type=\"time\" id=\"hol2_8\" value=\"{{msg.payload[71]}}\"></td>\n  </tr>\n</table>\n<br/>\n<br/>\n<p align=\"center\">\n    <label for=\"id_num\">Row to Add/Edit:  </label><input type=\"number\" id=\"id_num\" min=\"1\" max=\"8\" value=\"1\" style=\"width: 40px\">\n</p>    \n<p align=\"center\">\n    <label for=\"timeset\">Time to Add/Edit:   </label><input type=\"time\" id=\"timeset\">\n</p>\n<p align=\"center\">\n    <input type=\"button\" id=\"sa\" value=\"Set All\" onclick=\"setAll()\" />\n    <input type=\"button\" id=\"smf\" value=\"Set Mon-Fri\" onclick=\"setMonFri()\" />\n    <input type=\"button\" id=\"clrrow\" value=\"Clear Row\" onclick=\"clearRow()\" />\n    <input type=\"button\" id=\"clrall\" value=\"Clear All\" onclick=\"clearAll()\" />\n</p>\n<p align=\"center\">\n    <input type=\"button\" id=\"bt\" value=\"Save All Schedules\" onclick=\"saveTableData()\" />\n</p>\n<script>\n\ntheScope = scope;\n(function(scope) {\n    scope.$watch('msg', function(msg){\n    } );  \n})(scope);\n\nfunction saveTableData() {\n    var myTab = document.getElementById('myTable');\n    var numrows = document.getElementById('id_num').value;\n    var arrTbl = [];\n    for (i = 1; i < numrows; i++) {\n\n        // LOOP THROUGH EACH CELL OF THE CURENT ROW TO READ CELL VALUES.\n        for (var j = 1; j < 10; j++) {\n            if (j == 1) {\n                var dayVal = ('mon' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            } else if (j == 2) {\n                var dayVal = ('tue' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            } else if (j == 3) {\n                var dayVal = ('wed' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            } else if (j == 4) {\n                var dayVal = ('thu' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            } else if (j == 5) {\n                var dayVal = ('fri' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            } else if (j == 6) {\n                var dayVal = ('sat' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            } else if (j == 7) {\n                var dayVal = ('sun' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            } else if (j == 8) {\n                var dayVal = ('hol1_' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            } else if (j == 9) {\n                var dayVal = ('hol2_' + i); \n                var timeVal = document.getElementById(dayVal).value;\n            }\n            arrTbl.push(timeVal);\n        }\n    }\n    theScope.send({payload:arrTbl});\n}\n\nfunction setAll() {\n    var idVal = document.getElementById('id_num').value;\n    var timeVal = document.getElementById('timeset').value;\n    document.getElementById('mon' + idVal).value = timeVal;\n    document.getElementById('tue' + idVal).value = timeVal;\n    document.getElementById('wed' + idVal).value = timeVal;\n    document.getElementById('thu' + idVal).value = timeVal;\n    document.getElementById('fri' + idVal).value = timeVal;\n    document.getElementById('sat' + idVal).value = timeVal;\n    document.getElementById('sun' + idVal).value = timeVal;\n    document.getElementById('hol1_' + idVal).value = timeVal;\n    document.getElementById('hol2_' + idVal).value = timeVal;\n    document.getElementById(\"id_num\").stepUp(1);\n}\nfunction setMonFri() {\n    var idVal = document.getElementById('id_num').value;\n    var timeVal = document.getElementById('timeset').value;\n    document.getElementById('mon' + idVal).value = timeVal;\n    document.getElementById('tue' + idVal).value = timeVal;\n    document.getElementById('wed' + idVal).value = timeVal;\n    document.getElementById('thu' + idVal).value = timeVal;\n    document.getElementById('fri' + idVal).value = timeVal;\n    document.getElementById(\"id_num\").stepUp(1);\n}\nfunction clearRow() {\n    var idVal = document.getElementById('id_num').value;\n    var timeVal = null;\n    document.getElementById('mon' + idVal).value = timeVal;\n    document.getElementById('tue' + idVal).value = timeVal;\n    document.getElementById('wed' + idVal).value = timeVal;\n    document.getElementById('thu' + idVal).value = timeVal;\n    document.getElementById('fri' + idVal).value = timeVal;\n    document.getElementById('sat' + idVal).value = timeVal;\n    document.getElementById('sun' + idVal).value = timeVal;\n    document.getElementById('hol1_' + idVal).value = timeVal;\n    document.getElementById('hol2_' + idVal).value = timeVal;\n}\nfunction clearAll() {\n    var timeVal = null;\n    for (i = 1; i < 9; i++) {\n    document.getElementById('mon' + i).value = timeVal;\n    document.getElementById('tue' + i).value = timeVal;\n    document.getElementById('wed' + i).value = timeVal;\n    document.getElementById('thu' + i).value = timeVal;\n    document.getElementById('fri' + i).value = timeVal;\n    document.getElementById('sat' + i).value = timeVal;\n    document.getElementById('sun' + i).value = timeVal;\n    document.getElementById('hol1_' + i).value = timeVal;\n    document.getElementById('hol2_' + i).value = timeVal;\n    }\n}\n</script>\n</div>","storeOutMessages":true,"fwdInMessages":false,"resendOnRefresh":true,"templateScope":"local","x":3200,"y":220,"wires":[["bdd216a7.7b1bb8"]]},{"id":"c44c643e.4cd148","type":"function","z":"e48251f5.5dd04","name":"","func":"var numFlow = flow.get(\"number_scheds\");\nvar flowNames = [];\nvar outputMsgs = [];\nfor (i=0; i < numFlow; i++) {\n    var x=i+1;\n    var scheds = ('sched' + x + '_name');\n    flowNames[i] = flow.get(scheds);\n}\nreturn { payload: flowNames };","outputs":1,"noerr":0,"x":3150,"y":100,"wires":[["74d821a4.660c3"]]},{"id":"74d821a4.660c3","type":"change","z":"e48251f5.5dd04","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":3300,"y":100,"wires":[["6bf457b7.54a098"]]},{"id":"6bf457b7.54a098","type":"ui_dropdown","z":"e48251f5.5dd04","name":"","label":"Select Schedule","tooltip":"","place":"Select Schedule","group":"174ed778.668a29","order":2,"width":6,"height":1,"passthru":true,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":3500,"y":100,"wires":[["cfd5dd1.1f5712"]]},{"id":"ba48ad4b.0f60f","type":"inject","z":"e48251f5.5dd04","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":2990,"y":100,"wires":[["c44c643e.4cd148","e1e9e72a.336a48"]]},{"id":"ceabda3e.5fe488","type":"function","z":"e48251f5.5dd04","name":"","func":"msg.payload = flow.get(\"sched1_name\");\nreturn msg;","outputs":1,"noerr":0,"x":3330,"y":140,"wires":[["6bf457b7.54a098"]]},{"id":"e1e9e72a.336a48","type":"delay","z":"e48251f5.5dd04","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":3160,"y":140,"wires":[["ceabda3e.5fe488"]]},{"id":"cfd5dd1.1f5712","type":"function","z":"e48251f5.5dd04","name":"","func":"flow.set(\"curr_sched\", msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":3650,"y":100,"wires":[["c16311b3.7ec3e"]]},{"id":"3df26c4f.db3ba4","type":"function","z":"e48251f5.5dd04","name":"","func":"var currSched = flow.get(\"curr_sched\");\nif (Array.isArray(msg.payload)) { // replace all tableData\n    tableData=(msg.payload); \n}\nflow.set(currSched,tableData);\n","outputs":1,"noerr":0,"x":3470,"y":220,"wires":[[]]},{"id":"bdd216a7.7b1bb8","type":"switch","z":"e48251f5.5dd04","name":"","property":"payload","propertyType":"msg","rules":[{"t":"istype","v":"array","vt":"array"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":3330,"y":220,"wires":[["3df26c4f.db3ba4"],[]]},{"id":"c16311b3.7ec3e","type":"function","z":"e48251f5.5dd04","name":"","func":"var currSched = flow.get(\"curr_sched\");\nmsg.payload = flow.get(currSched);\nreturn msg;","outputs":1,"noerr":0,"x":3070,"y":220,"wires":[["64acf673.201118"]]},{"id":"af34c073.cf389","type":"ui_group","z":"","name":"HTML Table","tab":"4573d59d.1d525c","order":2,"disp":false,"width":"30","collapse":false},{"id":"174ed778.668a29","type":"ui_group","z":"","name":"Selector","tab":"4573d59d.1d525c","order":1,"disp":false,"width":30,"collapse":false},{"id":"4573d59d.1d525c","type":"ui_tab","z":"","name":"Schedule","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

I am using persistent storage to save the schedules to a file. The following variables should either be added to the flow or to your persistent storage file;

"number_scheds": 3,
"sched1_name": "Occupied",
"sched2_name": "Unoccupied",
"sched3_name": "Holiday",
"curr_sched": "Occupied",
"Occupied": ,
"Unoccupied": ,
"Holiday": ,

The flow allows for multiple schedules to be created - there may be a more elegant way to do this but this is working for me.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.