I’ve ended up making dedicated pages for all ‘popups’ that would need user interaction (as in save/load/delete screens).
I also didn’t want to make 100+ events to control visibility. So, I end up having Node-Red do a conversion from the PAC Control int32 variables into boolean values and then pass the boolean values to groov VIEW. Then I have arrays of boolean values to use for visibility in groov VIEW.
This approach can run into an issue, because there is only one single-threaded job queue between Node-Red and groov VIEW. So depending on how many variables, and how fast you want to have visibility change, you can quickly overflow this queue and it will stop transmitting.
I work around this with selective use of the rbe node in NR and splitting my Visibility boolean arrays into multiple smaller arrays and only transmitting the select variables that are actually changing. This prevents overflow for me. – see attached flow but not sure how clear my code is.
[{"id":"e96b9086.91fb58","type":"pac-read","z":"7dcf805a.da93f","device":"da7a377f.2e79c8","dataType":"int32-table","tagName":"ntTEMP_DisplayVars","tableStartIndex":"","tableLength":"","value":"","valueType":"msg.payload","topic":"DisplayVars","topicType":"user","name":"","x":330,"y":440,"wires":[["7c200e3a.d19ed8"]]},{"id":"f78c078e.b43868","type":"inject","z":"7dcf805a.da93f","name":"","topic":"","payload":"","payloadType":"date","repeat":"0.33","crontab":"","once":false,"onceDelay":"2","x":130,"y":440,"wires":[["e96b9086.91fb58","a3fd4d.69695ab"]]},{"id":"bc5bef8b.9beb1","type":"groov-write-ds","z":"7dcf805a.da93f","dataStore":"6961d0ec.3296a","tagName":"","tableStartIndex":"","value":"payload.value","valueType":"msg","name":"","x":1150,"y":381,"wires":[[]]},{"id":"6dff7f70.ea652","type":"function","z":"7dcf805a.da93f","name":"process","func":"var data = []; var data1 = []; var data2 = []; var data3 = [];\nNo_of_SS = msg.payload.ControlType.length - 5; //current number of SS minus the 5 hardwired Limit controllers\nfor(j = 0; j < No_of_SS; j++)\n{\n if(msg.payload.ControlType[j] <= 1) //if SS is enabled (0=PLC; 1=On/Off; 2=Disabled; 3=Limit)\n {\n for(i = 1; i < 6; i++) //each SS has 5 types of variables used create a profile\n {\n if (msg.payload.DisplayVars[i+j*5] >= 1)\n {\n data.push({ tagName : 'Prof_DisVars_Typ0',\n tableStartIndex : i+j*5,\n value : true}); \n } else{\n data.push({ tagName : 'Prof_DisVars_Typ0',\n tableStartIndex : i+j*5,\n value : false}); } \n \n if (msg.payload.DisplayVars[i+j*5] == 1)\n {\n data1.push({ tagName : 'Prof_DisVars_Typ1',\n tableStartIndex : i+j*5,\n value : true}); \n } else{\n data1.push({ tagName : 'Prof_DisVars_Typ1',\n tableStartIndex : i+j*5,\n value : false}); } \n \n if (msg.payload.DisplayVars[i+j*5] == 2)\n {\n data2.push({ tagName : 'Prof_DisVars_Typ2',\n tableStartIndex : i+j*5,\n value : true}); \n } else{\n data2.push({ tagName : 'Prof_DisVars_Typ2',\n tableStartIndex : i+j*5,\n value : false}); }\n \n if (msg.payload.DisplayVars[i+j*5] == 3)\n {\n data3.push({ tagName : 'Prof_DisVars_Typ3',\n tableStartIndex : i+j*5,\n value : true}); \n } else{\n data3.push({ tagName : 'Prof_DisVars_Typ3',\n tableStartIndex : i+j*5,\n value : false}); } \n }\n }\n}\nreturn [{payload : data }, {payload : data1 },\n {payload : data2 },{payload : data3 }]; // this object array becomes the new payload\n \n \n ","outputs":4,"noerr":0,"x":700,"y":441,"wires":[["c49e2de7.186e6"],["8f26c4a2.6f313"],["6f45590c.20574"],["96a922f6.35667"]]},{"id":"f732073f.df3f28","type":"split","z":"7dcf805a.da93f","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":990,"y":381,"wires":[["bc5bef8b.9beb1"]]},{"id":"c49e2de7.186e6","type":"rbe","z":"7dcf805a.da93f","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":850,"y":381,"wires":[["f732073f.df3f28"]]},{"id":"6f45590c.20574","type":"rbe","z":"7dcf805a.da93f","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":850,"y":475,"wires":[["e67b0880.c4cfe"]]},{"id":"8f26c4a2.6f313","type":"rbe","z":"7dcf805a.da93f","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":850,"y":428,"wires":[["18056a59.af87fe"]]},{"id":"96a922f6.35667","type":"rbe","z":"7dcf805a.da93f","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":850,"y":522,"wires":[["9e48a5f7.3b7368"]]},{"id":"390bab8d.6f111c","type":"groov-write-ds","z":"7dcf805a.da93f","dataStore":"6961d0ec.3296a","tagName":"","tableStartIndex":"","value":"payload.value","valueType":"msg","name":"","x":1150,"y":428,"wires":[[]]},{"id":"18056a59.af87fe","type":"split","z":"7dcf805a.da93f","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":990,"y":428,"wires":[["390bab8d.6f111c"]]},{"id":"c9842c32.69e12","type":"groov-write-ds","z":"7dcf805a.da93f","dataStore":"6961d0ec.3296a","tagName":"","tableStartIndex":"","value":"payload.value","valueType":"msg","name":"","x":1150,"y":475,"wires":[[]]},{"id":"e67b0880.c4cfe","type":"split","z":"7dcf805a.da93f","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":990,"y":475,"wires":[["c9842c32.69e12"]]},{"id":"44a64a8a.d0faac","type":"groov-write-ds","z":"7dcf805a.da93f","dataStore":"6961d0ec.3296a","tagName":"","tableStartIndex":"","value":"payload.value","valueType":"msg","name":"","x":1150,"y":522,"wires":[[]]},{"id":"9e48a5f7.3b7368","type":"split","z":"7dcf805a.da93f","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":990,"y":522,"wires":[["44a64a8a.d0faac"]]},{"id":"165764b5.890beb","type":"comment","z":"7dcf805a.da93f","name":"Show/Hide SS Variables during Profile Create - Tied to Create_Profile Chart in PAC Control","info":"","x":360,"y":380,"wires":[]},{"id":"7c200e3a.d19ed8","type":"join","z":"7dcf805a.da93f","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":550,"y":441,"wires":[["6dff7f70.ea652"]]},{"id":"a3fd4d.69695ab","type":"pac-read","z":"7dcf805a.da93f","device":"da7a377f.2e79c8","dataType":"int32-table","tagName":"ntSET_ControlType","tableStartIndex":"","tableLength":"","value":"","valueType":"msg.payload","topic":"ControlType","topicType":"user","name":"","x":320,"y":491,"wires":[["7c200e3a.d19ed8"]]},{"id":"da7a377f.2e79c8","type":"pac-device","z":"","address":"localhost","protocol":"https"},{"id":"6961d0ec.3296a","type":"groov-data-store","z":"","project":"e81a7d90.07d29","dsName":"VIEW_Variables"},{"id":"e81a7d90.07d29","type":"groov-project","z":"","address":"localhost"}]