Hey @zenofmud Paul Thanks it does what i want but is still having a problem when the dropdown options appears on dashboar looks like this:
As I understand that is a key object there is a way to change the 0 for example for the name equation sally and the for the 1 equation carl or something like that?
here is the image of the debug
also I have another problem when i reboot my Raspberry my json file with the equations saved are like erased when i try to recover it in the debug appears empty i will put an screenshot and also the flow.
[{"id":"2a76abae.3cb354","type":"inject","z":"217dd16.38f122e","name":"Daily backup","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 02 * * *","once":false,"onceDelay":"","x":160,"y":320,"wires":[["404e5869.289af8"]]},{"id":"404e5869.289af8","type":"function","z":"217dd16.38f122e","name":"Prep data","func":"// global variables separated by semicolon to be saved\nvar globallist = \"equa;timeminute\"\nvar mylist = globallist.split(\";\");\n\nvar outputs = [];\n\nfor (i=0; i<mylist.length; i++) {\n outputs.push({ key : mylist[i], type: typeof global.get(mylist[i]), value: global.get(mylist[i])});\n}\n \n \nmsg.payload = outputs;\nreturn msg;\n\n//msg.payload=typeof global.get(\"torrent_keywords\");\n","outputs":1,"noerr":0,"x":340,"y":320,"wires":[["796ae060.2571d"]]},{"id":"722bde30.b4061","type":"comment","z":"217dd16.38f122e","name":"Save global variables","info":"","x":160,"y":280,"wires":[]},{"id":"82ed5561.8ea6c8","type":"comment","z":"217dd16.38f122e","name":"Restore global variables","info":"","x":160,"y":360,"wires":[]},{"id":"623cfee.c4562","type":"inject","z":"217dd16.38f122e","name":"Startup","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":140,"y":400,"wires":[["ec4e4dad.53165"]]},{"id":"3cf22d71.3cf902","type":"file","z":"217dd16.38f122e","name":"","filename":"/home/pi/global.json","appendNewline":true,"createDir":false,"overwriteFile":"true","x":660,"y":320,"wires":[["41a8df7d.8a1b2"]]},{"id":"ec4e4dad.53165","type":"file in","z":"217dd16.38f122e","name":"","filename":"/home/pi/global.json","format":"utf8","x":340,"y":400,"wires":[["cc306e1f.95de2"]]},{"id":"baebe8d4.f4d4e8","type":"function","z":"217dd16.38f122e","name":"Restore","func":"var output = [];\n\nfor (var i=0; i<msg.payload.length; i++) {\n switch (msg.payload[i].type) {\n case 'undefined': \n // the global variable probably had no value, nothing needs to be restored\n output.push(msg.payload[i].key + \" is undefined.\");\n break;\n case 'number':\n if (msg.payload[i].value===\"NaN\") {\n // there is no valid value to be restored, skip this variable\n output.push(msg.payload[i].key + \" is NaN.\");\n } else {\n if (msg.payload[i].value.toString().indexOf(\".\")>-1) {\n // the value appears to be a float\n global.set(msg.payload[i].key,parseFloat(msg.payload[i].value));\n output.push(msg.payload[i].key + \" is restored to \" + msg.payload[i].value);\n } else {\n global.set(msg.payload[i].key,parseInt(msg.payload[i].value));\n output.push(msg.payload[i].key + \" is restored to \" + msg.payload[i].value);\n }\n }\n break;\n case 'string':\n global.set(msg.payload[i].key,msg.payload[i].value);\n output.push(msg.payload[i].key + \" is restored to \" + msg.payload[i].value);\n break;\n case 'boolean':\n global.set(msg.payload[i].key,msg.payload[i].value===\"true\");\n output.push(msg.payload[i].key + \" is restored to \" + msg.payload[i].value);\n break;\n }\n}\n\nmsg.payload = output;\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":400,"wires":[["5bc9e96f.723ff8"]]},{"id":"796ae060.2571d","type":"json","z":"217dd16.38f122e","name":"","x":490,"y":320,"wires":[["3cf22d71.3cf902"]]},{"id":"cc306e1f.95de2","type":"json","z":"217dd16.38f122e","name":"","x":510,"y":400,"wires":[["baebe8d4.f4d4e8"]]},{"id":"5bc9e96f.723ff8","type":"function","z":"217dd16.38f122e","name":"equation restore","func":"msg.topic = \"equa\";\nmsg.payload = global.get(\"equa\");\nreturn msg;","outputs":1,"noerr":0,"x":800,"y":400,"wires":[["e13d9371.87db7"]]},{"id":"41a8df7d.8a1b2","type":"debug","z":"217dd16.38f122e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":320,"wires":[]},{"id":"73bebdc6.3a46b4","type":"ui_dropdown","z":"217dd16.38f122e","name":"","label":"","tooltip":"","place":"Select option","group":"679f2509.be684c","order":0,"width":0,"height":0,"passthru":true,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":1360,"y":400,"wires":[["810a2cc2.b603c","fda2e215.67a4"]]},{"id":"810a2cc2.b603c","type":"ui_toast","z":"217dd16.38f122e","position":"top right","displayTime":"3","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":1570,"y":460,"wires":[]},{"id":"93af67ea.420c68","type":"function","z":"217dd16.38f122e","name":"transform data to correct format","func":"msg.options = [];//create empty array\n let row = msg.payload; //get the row\n msg.options.push(row);//add the row to array \nreturn msg;","outputs":1,"noerr":0,"x":1150,"y":400,"wires":[["73bebdc6.3a46b4"]]},{"id":"fda2e215.67a4","type":"debug","z":"217dd16.38f122e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1550,"y":340,"wires":[]},{"id":"6114a54b.88c9fc","type":"inject","z":"217dd16.38f122e","name":"","topic":"","payload":"y = 2.1425x + 3.8416 ","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":140,"wires":[["8300838.480678"]]},{"id":"33030a2a.bd0b66","type":"inject","z":"217dd16.38f122e","name":"","topic":"","payload":"y = 4.4607x + 8.3455 ","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":180,"wires":[["8300838.480678"]]},{"id":"4037b410.2ddfac","type":"inject","z":"217dd16.38f122e","name":"","topic":"","payload":"y = 7.5648x + 13.75","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":220,"wires":[["8300838.480678"]]},{"id":"e13d9371.87db7","type":"function","z":"217dd16.38f122e","name":"","func":"var arr = global.get(\"equa\")||[];\nmsg.payload = arr;\nreturn msg;","outputs":1,"noerr":0,"x":950,"y":400,"wires":[["93af67ea.420c68"]]},{"id":"8300838.480678","type":"function","z":"217dd16.38f122e","name":"","func":"if (!context.outputAlarms) {\n context.outputAlarms = [];\n}\ncontext.outputAlarms.push(msg.payload);\nmsg.payload = context.outputAlarms;\nreturn msg; ","outputs":1,"noerr":0,"x":430,"y":180,"wires":[["71ed98ef.8705c8","6d54e799.eb1b68"]]},{"id":"71ed98ef.8705c8","type":"debug","z":"217dd16.38f122e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":180,"wires":[]},{"id":"6d54e799.eb1b68","type":"function","z":"217dd16.38f122e","name":"","func":"var equa = msg.payload;\n\nglobal.set('equa',equa);\n\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":140,"wires":[["31a04691.d2251a"]]},{"id":"31a04691.d2251a","type":"debug","z":"217dd16.38f122e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":140,"wires":[]},{"id":"a89a8a34.044418","type":"comment","z":"217dd16.38f122e","name":"equation data in","info":"","x":140,"y":100,"wires":[]},{"id":"679f2509.be684c","type":"ui_group","z":"","name":"Default","tab":"658319a6.10c4d8","disp":true,"width":"6","collapse":false},{"id":"658319a6.10c4d8","type":"ui_tab","z":"","name":"Menu","icon":"fa-tachometer","order":1,"disabled":false,"hidden":false}]