Ui template & global scope

#1

Hello,

I am trying to access the global scope in a ui template (<script> var myVar = global.get("MyVariable"); </script> ) but that results in a 'global is not defined' error message. Can I access it there and if so, using what syntax? tia!

0 Likes

#2

No, you cannot access it directly. The only way to do so would be to create a flow that copies a context property on to a message you then pass to the ui_template node.

0 Likes

#3

OK thanks, will do that then!

0 Likes