sfedo
11 March 2021 08:12
1
Hello everyone,
I would like to hide some tabs and groups and show some other only with one function node. What is the right format to do so. In the description the both functions are separated. Is it possible to combine them somehow?
I was trying this:
if(msg.tab==3){
msg.payload=
{"tabs":
{"hide":
["Home_1","Strommessung","Mobile","Home_2"],
"show":
["Home_mobile","Strom_mobile"]}},
{"group":
{"hide":["Home_mobile_Start"],
"show":["Home_mobile_Start_mobile"],
"focus":true}}
}
return msg;
but it doestn work. It only shows and hide the tabs, but not the groups. What am I missing?
Good question indeed.
Your msg.payload
is not even a valid object, so it seems normal that your code will not work.
Can´t you possibly issue two different payloads for each purpose ? One for managing groups and then another one to manage tabs ?
PS: Perhaps you want to test with this modified object ? I did not test as it woudl take some time to build all those groups and tabs.
{
"tabs": {
"hide": [
"Home_1",
"Strommessung",
"Mobile",
"Home_2"
],
"show": [
"Home_mobile",
"Strom_mobile"
]
},
"group": {
"hide": [
"Home_mobile_Start"
],
"show": [
"Home_mobile_Start_mobile"
]
}
}
1 Like
sfedo
12 March 2021 08:57
3
It seems to work! Thank you very much!
1 Like
system
Closed
26 March 2021 08:58
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.