How to make a transition to the site by clicking on the name

Hello!
I made a calculator for calculating and selecting equipment, I need it so that at the end, when the calculator gives out the name of the equipment, you can click on this name and go to the site of this equipment by this name. How can this be done? I wanted to do this with code, but I don't know how. Please help, this is very urgent.
Here is my selection code


My JSON code

[{"id":"fb4eb2f5e171fae9","type":"ui_text","z":"f81c1222e6e0c76a","group":"9504fbd560a873d3","order":0,"width":"0","height":"0","name":"","label":"circuit breaker:","format":"{{msg.payload.result1}}","layout":"col-center","className":"","x":1080,"y":300,"wires":[]},{"id":"31b681a4e2cd5b5d","type":"ui_form","z":"f81c1222e6e0c76a","name":"","label":"FC","group":"9504fbd560a873d3","order":1,"width":"0","height":"0","options":[{"label":"Pн","value":"Pн","type":"number","required":true,"rows":null},{"label":"Uн","value":"Uн","type":"number","required":true,"rows":null},{"label":"cosf","value":"cosf","type":"number","required":true,"rows":null},{"label":"kpd","value":"kpd","type":"number","required":true,"rows":null},{"label":"k","value":"k","type":"number","required":true,"rows":null}],"formValue":{"Pн":"","Uн":"","cosf":"","kpd":"","k":""},"payload":"","submit":"Oк","cancel":"Отмена","topic":"topic","topicType":"msg","splitLayout":false,"className":"","x":450,"y":300,"wires":[["2ba28de77ad402d1","c544db425bbc8e78","e01052c62947abd5"]]},{"id":"2ba28de77ad402d1","type":"function","z":"f81c1222e6e0c76a","name":"","func":"const Pн = msg.payload.Pн;\nconst Uн = msg.payload.Uн;\nconst cosf = msg.payload.cosf;\nconst kpd = msg.payload.kpd;\n\nmsg.payload.result1 = Math.round((Pн*1000/(Math.sqrt(3) * Uн * cosf * kpd)));\n\nif ( msg.payload.result1<=150) {\n    C16H3MA150='https://www.se.com/ru/ru/product/C16H3MA150/автомат-выключатель-compact-nsx160h-70-ka-415-в-пер-тока-3п3т-расцеп-ma150-a/';\n    msg.payload.result1 = 'C16H3MA150';\n} else if (msg.payload.result1<=320) {\n    LV432750='https://www.se.com/ru/ru/product/LV432750/автомат-выключатель-compact-nsx400h-70-ka-при-415-в-пер-тока-3p3t-расцеп-micrologic-1-3-m-320-a/';\n    msg.payload.result1 = 'LV432750';\n} else if (msg.payload.result1<=100) {\n   C10H3MA100='https://www.se.com/ru/ru/product/C10H3MA100/автомат-выключатель-compact-nsx100h-70-ka-при-415-в-пер-тока-3п3т-расцеп-ma100-a/';\n    msg.payload.result1 = 'C10H3MA100';\n} else if (msg.payload.result1<=500) {\n   C63H31M500='https://www.se.com/ru/ru/product/C63H31M500/автомат-выключатель-compact-nsx630h-70-ka-415-в-пер-тока-3п3т-расцеп-micrologic-1-3-m-500-a/';\n    msg.payload.result1 = 'C63H31M500';\n} else if (msg.payload.result1<=800) {\n   A33554='https://www.se.com/ru/ru/product/33554/автомат-выключатель-compact-ns800l-150-ka-при-415-в-пер-тока-3p3t-расцеп-micrologic-5-0-800-a-стационар-/';\n    msg.payload.result1 = 'A33554';\n} else {\n    msg.payload.result1 = 'not';\n    \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":300,"wires":[["83d7266ca91e497f","fb4eb2f5e171fae9"]]},{"id":"83d7266ca91e497f","type":"debug","z":"f81c1222e6e0c76a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1070,"y":220,"wires":[]},{"id":"7ff02e4efe632b4e","type":"ui_text","z":"f81c1222e6e0c76a","group":"9504fbd560a873d3","order":2,"width":"0","height":"0","name":"","label":"contactor:","format":"{{msg.payload.result2}}","layout":"col-center","className":"","x":1060,"y":360,"wires":[]},{"id":"3496e2c0a2891c4e","type":"ui_text","z":"f81c1222e6e0c76a","group":"9504fbd560a873d3","order":3,"width":"0","height":"0","name":"","label":"FC:","format":"{{msg.payload.result3}}","layout":"col-center","className":"","x":1050,"y":420,"wires":[]},{"id":"c544db425bbc8e78","type":"function","z":"f81c1222e6e0c76a","name":"","func":"const Pн = msg.payload.Pн;\nconst Uн = msg.payload.Uн;\nconst cosf = msg.payload.cosf;\nconst kpd = msg.payload.kpd;\nconst k = msg.payload.k;\n\nIn= Math.round((Pн*1000/(Math.sqrt(3) * Uн * cosf * kpd)));\nIп= In * k;\n\nif ( Iп<=115 ) {\n LC1D115P7 = 'https://www.se.com/ru/ru/product/LC1D115P7/контактор-d-3p-115ано+нз230b50-60гц/';\n    msg.payload.result2 = 'LC1D115P7';\n} else if (Iп<=265) {\n    LC1F265P7='https://www.se.com/ru/ru/product/LC1F265P7/контактор-f-3p265а230в50-60гц/';\n    msg.payload.result2 = 'LC1F265P7';\n} else if (Iп<=150) {\n    msg.payload.result2 = 'https://schneider-24.ru/product/dekraft-kontaktor-150a-220v-as3-1no-1nz-km-103/#props';\n\n} else if (Iп<=400) {\n    LC1G400KUEN='https://www.se.com/ru/ru/product/LC1G400KUEN/контактор-tesys-lc1g-400a-440в-3p-ac3-standard-100250в-катушка-acdc/';\n    msg.payload.result2 = 'LC1G400KUEN'; \n} else if (Iп<=500) {\n   LC1G500KUEN='https://www.se.com/ru/ru/product/LC1G500KUEN/контактор-tesys-lc1g-500a-440в-3p-ac3-standard-100250в-катушка-acdc/';\n    msg.payload.result2 = 'LC1G500KUEN';\n} else if (Iп<=630) {\n   LC1F630P7='https://www.se.com/ru/ru/product/LC1F630P7/контактор-f-3p630-а230в50-60гц/';\n    msg.payload.result2 = 'LC1F630P7';\n} else {\n    msg.payload.result2 = 'not';\n    \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":360,"wires":[["83d7266ca91e497f","7ff02e4efe632b4e"]]},{"id":"e01052c62947abd5","type":"function","z":"f81c1222e6e0c76a","name":"","func":"const Pн = msg.payload.Pн;\nconst Uн = msg.payload.Uн;\nconst cosf = msg.payload.cosf;\nconst kpd = msg.payload.kpd;\n\nI = Math.round((Pн*1000/(Math.sqrt(3) * Uн * cosf * kpd)));\nS = Math.round(((Math.sqrt(3) * Uн * I)/1000));\n\nif (S <= 44.6) {\n   ATV212HD30M3X='https://www.se.com/ru/ru/product/ATV212HD30M3X/преобразователь-частоты-atv212-30-квт-240в-ip21/';\n    msg.payload.result3 = 'ATV212HD30M3X';\n} else if ((S <= 44.8) || (S <= 36.8)) {\n    ATV630D37M3='https://www.se.com/ru/ru/product/ATV630D37M3/преобразователь-частоты-atv630-37-квт-50-л-с-200240-в-ip21/';\n    msg.payload.result3 = 'ATV630D37M3';\n} else if ((S <= 83.7) || (S <= 61.1))  {\n    ATV630D75M3='https://www.se.com/ru/ru/product/ATV630D75M3/преобразователь-частоты-atv630-75-квт-100-л-с-200240-в-ip21/';\n    msg.payload.result3 = 'ATV630D75M3';\n} else if (S <= 61.9) {\n    ATV212HD45N4='https://www.se.com/ru/ru/product/ATV212HD45N4/преобразователь-частоты-atv212-45квт-480в-ip21/';\n    msg.payload.result3 = 'ATV212HD45N4';\n} else if (S <= 76.3) {\n    ATV212HD55N4='https://www.se.com/ru/ru/product/ATV212HD55N4/преобразователь-частоты-atv212-55квт-480в-ip21/';\n    msg.payload.result3 = 'ATV212HD55N4';\n} else if (S <= 105.3) {\n    ATV212WD75N4='https://www.se.com/ru/ru/product/ATV212WD75N4/преобразователь-частоты-atv212-75квт-480в-ip55/';\n    msg.payload.result3 = 'ATV212WD75N4';\n} else if ((S <= 201.3) || (S <= 161.4)) {\n    ATV630C16N4='https://www.se.com/ru/ru/product/ATV630C16N4/преобразователь-частоты-atv630-160-квт-200-л-с-380480-в-ip00/';\n    msg.payload.result3 = 'ATV630C16N4';\n} else if ((S <= 247) || (S <= 187)) {\n   ATV630C22N4='https://www.se.com/ru/ru/product/ATV630C22N4/преобразователь-частоты-atv630-220-квт-380в-3ф/';\n    msg.payload.result3 = 'ATV630C22N4';\n} else if ((S <= 279) || (S <= 229)) {\n   ATV630C25N4='https://www.se.com/ru/ru/product/ATV630C25N4/преобразователь-частоты-atv630-250-квт-380в-3ф/';\n    msg.payload.result3 = 'ATV630C25N4';\n} else if ((S <= 351) || (S <= 286)) {\n   ATV930C31N4C='https://www.se.com/ru/ru/product/ATV930C31N4C/преобразователь-частоты-atv930-310-250-квт-380в-3ф-без-тормозного-прерывателя/';\n    msg.payload.result3 = 'ATV930C31N4C';\n} else {\n    msg.payload.result3 = 'not';\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":420,"wires":[["83d7266ca91e497f","3496e2c0a2891c4e"]]},{"id":"9504fbd560a873d3","type":"ui_group","name":"Calcula1","tab":"cb1cabc0e8da7437","order":2,"disp":true,"width":"6","collapse":true,"className":""},{"id":"cb1cabc0e8da7437","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Please edit your post title to describe your problem, just saying that it's urgent does not help other users when they search the forum in the future.

Well not sure quite what you mean but if you mean you want your results to be links to those pages then that is standard html... - and you need to declare each variable eg
something like

else if (msg.payload.result1<=320) {
    var LV432750='https://www.se.com/ru/ru/product/LV432750/автомат-выключатель-compact-nsx400h-70-ka-при-415-в-пер-тока-3p3t-расцеп-micrologic-1-3-m-320-a/';
    msg.payload.result1 = '<a href="' +LV432750+'">LV432750</a>';

for each option you have...

Also your logic is confused - in that you test some larger values before smaller ones - eg your test for <=150 is before your test for <=100 so if it less than 100 that would never get selected.

I think you may need to take a breath and slow down :slight_smile:

1 Like

Thank you very much, this is just what I need) I will take into account my mistakes, you helped me a lot

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.