First not possible directly using msg.tab, ie 0
You would first need to load your flow json, then filter out all ui_tab types and return the name properties.
Then you can us index 0 to add the property name to the group json.
e.g
[{"id":"0965bb151a929dda","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":380,"y":560,"wires":[["8fb335c0a1db20b7"]]},{"id":"8fb335c0a1db20b7","type":"file in","z":"d1395164b4eec73e","name":"","filename":"/your/path/to/flows.json","filenameType":"str","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":590,"y":560,"wires":[["d478de8751a8671a"]]},{"id":"d478de8751a8671a","type":"json","z":"d1395164b4eec73e","name":"","property":"payload","action":"","pretty":false,"x":650,"y":620,"wires":[["9db607cc713c5d35"]]},{"id":"9db607cc713c5d35","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"(\t $tabs := $$.payload[$.type = \"ui_tab\"].name;\t {\t \"group\":{\t \"hide\":[\t $tabs[0] & \"_Memory-Name\",\t $tabs[0] & \"_New\",\t $tabs[0] & \"_Memory\",\t $tabs[0] & \"_Backup\",\t $tabs[0] & \"_Update\"\t ],\t \"show\":[\t $tabs[0] & \"_Memory-Select\"\t ]\t }\t }\t)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":620,"wires":[["13ac52b76848d01c"]]},{"id":"13ac52b76848d01c","type":"debug","z":"d1395164b4eec73e","name":"debug 344","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":990,"y":620,"wires":[]}]
Home
is my tab 0
JSONata expression to create payload object
(
$tabs := $$.payload[$.type = "ui_tab"].name;
{
"group":{
"hide":[
$tabs[0] & "_Memory-Name",
$tabs[0] & "_New",
$tabs[0] & "_Memory",
$tabs[0] & "_Backup",
$tabs[0] & "_Update"
],
"show":[
$tabs[0] & "_Memory-Select"
]
}
}
)
You could probably save the tabs array to a context var on a daily basis and then just reference that if you wanted to, or watch the flow.json file for changes, then update the tabs array if the file has changed.