Node node-red-node-ui-list

I use node-red-node-ui-list within my dashboard, and i think its great and easy!
Only thing i cant find is how to define a default for the specified list...

Somebody else has got this working, or is this isnt available (yet :wink:)

What do you mean by default? Default look and feel ? Default size ?

the default value, the value that is selected by default.
When you have a menu, with different list nodes, select some values, execute and going back to the menu, i prefer the list nodes to have selected the initial (selected ) value when starting the menu for the first time

With the default drop node you can set the default value with a change node, setting the payload to a value.
With the installed list node you have to define a json as input with a change node. With this json you define the different list options, but no way to set a value by default, for example check the check box of a value to enable.

See my example the default dropbox nodes : Config, OS comand and Device can be set by a value.
List nodes: Pushover Peter etc.cant set the checkbox to true

the example (in the menu - import - example - ui-list ) the day-of-week flow shows how to set items checked etc - copied here

[{"id":"14b8ef42.1f4ef1","type":"ui_list","z":"bbc903d1.9442c","group":"da7ba9ac.589008","name":"","order":3,"width":"4","height":"7","lineType":"one","actionType":"check","allowHTML":false,"outputs":1,"topic":"","x":290,"y":260,"wires":[["ec837783.4eb048"]]},{"id":"39a617a5.c75d38","type":"inject","z":"bbc903d1.9442c","name":"Day of Week","topic":"","payload":"[{\"title\":\"Sunday\",\"isChecked\":true},{\"title\":\"Monday\"},{\"title\":\"Tuesday\"},{\"title\":\"Wednesday\"},{\"title\":\"Thursday\"},{\"title\":\"Friday\"},{\"title\":\"Saturday\",\"isChecked\":true}]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":260,"wires":[["14b8ef42.1f4ef1"]]},{"id":"ec837783.4eb048","type":"debug","z":"bbc903d1.9442c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":260,"wires":[]},{"id":"da7ba9ac.589008","type":"ui_group","z":"","name":"Default","tab":"fb758b35.92adb8","disp":true,"width":"12","collapse":false},{"id":"fb758b35.92adb8","type":"ui_tab","z":"","name":"List","icon":"dashboard"}]

I have updated the sidebar info to help make this more clear.

ok, thanks dceejay!
Going to finish my dashboard, it is working great!
Loving node-red more and more..

It works!

Last thing to do is to manage relations/rules between different UI list node.
By example:
When i choose Config = A, and OS command = Y, device has no use in this combination, it should be greyed out or at least back to defaults (when you already selected a device)

Is this possibe ?

You can send msg.enable=false to disable and grey out ui elements.

Got it working, and discovered the option menu in the node-list...
What a great node this is..
Before i use this node wrong, is it possible to add an own msg field to a menu-item.?
When - for example "Domoticz PVK RF" is selected, i have to POST [{"obj":1002,"type":"device","act":"On"}] to my self -made-api .

When this isnt possible, no problem, i have to add a field depending on the selected item (descriptions) afterwards...

        "title": "Server",
        "icon": "",
        "menu": [
            "Google Home PVK",
            "Domoticz PVK RF",
            "Domoticz PVK ZW",
            "Domoticz OOS RF",
            "Domoticz OOS ZW",
            "Dashticz OOS SCREEN",
            "PINGER SERVICE"
        "title": "OS Command",
        "icon": "",
        "menu": [
            "Herstarten van de server",
            "Herstarten van de domoticz service"
        "title": "Devices xxxx",
        "icon": "",
        "menu": [
            "Lantaarn AAN",
            "Lantaarn UIT",
            "Twee lampen AAN",
            "Twee lampen UIT",
            "Avond huis AAN",
            "Avond UIT",
            "Service herstarten",
            "PVK update dashticz",

You are correct - the node cannot do that currently. You need to use a following node to modify the message appropriately. You can however include extra properties on the incoming message - one of which could be the output message you want - and then just use a simple change node afterwards to move that property to the payload.
But not really easy for the menu version you are using.

indeed, with this option i have to compare with the userfriendly description of a menu option....when i change that i have to manage also other code..

What (better) menu option do you suggest? Is that node contrib ui builder ?
I am eager to learn more off node-red i got the taste...

Thanks to everyone, and despite all my stupid questions, my management dashboard is ready ..
for now .. :rofl:
I can start different rpis, services, activate devices, automatically restart a server if there is no response, logging, autom. cleaning etc ..

Here is an example of what I mean for just the PVK RF selection
The function uses the selected item to lookup back into the "output" object.

[{"id":"c30cf214.3b636","type":"inject","z":"bbc903d1.9442c","name":"Rooms","topic":"","payload":"[{\"title\":\"Server\",\"icon\":\"\",\"menu\":[\"Google Home PVK\",\"Domoticz PVK RF\",\"Domoticz PVK ZW\",\"Domoticz OOS RF\",\"Domoticz OOS ZW\",\"Dashticz OOS SCREEN\",\"PINGER SERVICE\"],\"output\":{\"Google Home PVK\":[{\"obj\":1001,\"type\":\"device\",\"act\":\"On\"}],\"Domoticz PVK RF\":[{\"obj\":1002,\"type\":\"device\",\"act\":\"On\"}]}},{\"title\":\"OS Command\",\"icon\":\"\",\"menu\":[\"Herstarten van de server\",\"Herstarten van de domoticz service\"]},{\"title\":\"Devices xxxx\",\"icon\":\"\",\"menu\":[\"Lantaarn AAN\",\"Lantaarn UIT\",\"Twee lampen AAN\",\"Twee lampen UIT\",\"Avond huis AAN\",\"Avond UIT\",\"Service herstarten\",\"PVK update dashticz\",\"I\",\"J\",\"K\",\"L\",\"M\"]}]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":480,"wires":[["3f635fc3.f6196"]]},{"id":"3f635fc3.f6196","type":"ui_list","z":"bbc903d1.9442c","group":"da7ba9ac.589008","name":"","order":1,"width":"6","height":"5","lineType":"three","actionType":"menu","allowHTML":true,"outputs":1,"topic":"","x":290,"y":480,"wires":[["ed57be22.83842","b35908a5.694fa8"]]},{"id":"ed57be22.83842","type":"debug","z":"bbc903d1.9442c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":530,"y":480,"wires":[]},{"id":"b35908a5.694fa8","type":"function","z":"bbc903d1.9442c","name":"","func":"var m = msg.payload.output[msg.payload.selected]\nreturn {payload:m};","outputs":1,"noerr":0,"x":410,"y":540,"wires":[["38b2c9bd.7e65e6"]]},{"id":"38b2c9bd.7e65e6","type":"debug","z":"bbc903d1.9442c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":590,"y":540,"wires":[]},{"id":"da7ba9ac.589008","type":"ui_group","z":"","name":"Default","tab":"fb758b35.92adb8","disp":true,"width":"12","collapse":false},{"id":"fb758b35.92adb8","type":"ui_tab","z":"","name":"List","icon":"dashboard"}]

Thanks dceejay! i will look at it!
I also managed to check the values of the list boxes and when selecting a value change the content of another, that works great..

still have one problem.
When i change values of my dashboard, everything is ok, but when i left values unchanged, i dont have the value ..

The dashboard is default correct filled with the right start values via a change script as input for the different ui-list. when i change a ui-list i read the payload and set a flow- var
when click the executing button i copy the flow vars to vars in the message so it can be used all the way ...

The flow vars when starting the dashboard are not alwaus the same as the initial values in de dashboard and when i dont change the corresponding ui-list , the wrong value is used.

Is there a way to

  1. set default flow values when starting the dashboard (@update is ui-control node meant for this?
  2. or read ui-list content without clicking on the ui-list?
  1. yes you need to send a message with the payload you want at the right time... either at dashboard start - or maybe whenever a browser connects (which you can detect with the ui_control node output.
  2. no

I use ui control, and when the browser connect, i initialize the flow-vars and the dashboard ui-lists

I figured out that when you send a dummy message to the change-nodes with the datasets for the list-nodes, the checkboxes resets to the dataset.

my menu, quit a thing... with dependecies between the choosen items...

And my main module ...

Just tried your example, unbel......
This is much easier to manage, only at one place at the beginning of the flow and hardly changes later ...

Is it true that when i like to adjust a list (the values) because of a selected item in another list, i better can split the three lists in three seperate list nodes so i can change the content easier per node?
(just for checking before i do some changes , i will change my setup with your example anyway

i get strange errors when i start node-red. Dont know if this is related with the next:
I push the next dataset with a function to my list-node, and it works ok.
In this set i defined a json dataset as a string because my server is expecting it this way.
'[{"obj":"lantaarn","act":"On"},{"obj":"Lamp tv links","act":"On"}]'
To get this accepted in my function without errors i need single quotes around it.
When i paste this dataset in a inject-node as json i get an error on the single quotes, when i change this to "" double quotes it works in a injector but not in a function...

The strange errors when starting up, is following...

                        "title": "Devices Klink",
                        "icon": "",
                        "menu": [
                            "Lantaarn AAN",
                            "Lantaarn UIT",
                            "Twee lampen AAN",
                            "Twee lampen UIT",
                            "Avond huis AAN",
                            "Avond UIT",
                            "Service herstarten",
                            "Update dashticz",
                            "Lantaarn aan na en voor 10 seconden",
                            "Message test via IFTTT en PUSHOVER",
                            "Lantaarn na 10 sec uit en dan na 10 seconden aan"
                        "output": {
                            "Lantaarn AAN": '[{"obj": 1002,"type": "device","act": "On"}]',
                            "Lantaarn UIT": '[{"obj": 1002,"type": "device","act": "Off"}]',
                            "Twee lampen AAN": '[{"obj":"lantaarn","act":"On"},{"obj":"Lamp tv links","act":"On"}]',
                            "Twee lampen UIT": '[{"obj":"lantaarn","act":"Off"},{"obj":"Lamp tv links","act":"Off"}]',
                            "Avond huis AAN": '[{"obj": 720,"type": "device","act": "On"}]',
                            "Avond UIT": '[{"obj": 720,"type": "device","act": "Off"}]',
                            "Service herstarten": '[{"obj": 720,"type": "device","act": "On"}]',
                            "Update dashticz": '[{"obj": 720,"type": "device","act": "Off"}]',
                            "Lantaarn aan na en voor 10 seconden": '[{"obj": 720,"type": "device","act": "On"}]',
                            "Message test via IFTTT en PUSHOVER": '[{"obj": 720,"type": "device","act": "Off"}]',
                            "Lantaarn na 10 sec uit en dan na 10 seconden aan": '[{"obj": 720,"type": "device","act": "Off"}]'