hello
the button has the option when clicked send flow or global. Either nothing happens or I get the message invalid properties.
Can you show me the correct necessary syntax?
I have now switched a function behind the button to flow.set ( 'button1',true)
With a lot of buttons these are many functions which probably are not necessary
If you have flow.set( 'button1',true)
and the value true
is stored in context storage, Then set flow to button1. That will send true
when pressed.
config from button
hello
either I didn't understand your answer or we are talking at cross purposes.
I want to configure this in the button see picture
No just button1
, the value true
will be read form context storage, as that where flow.set ( 'button1',true)
stored it. Also you stored it to flow not global global.set('button1', true)
, if you want to use global context storage. Global will be available to all flows, while flow will only be available to the flow you stored it from.
ok
this is not a write, this is a read from flow or in shown in my picture global?
I thought this was a send, because the headline says when clicked, send
When you click it sends whatever you tell it to send. You have told it to send global.button1 so it gets the value from global context and sends that. If you want clicking the button to set the context then configure the button to send true (or whatever) and feed that into a Change node to set the global context.
To add, if you want to send true
when clicked, the set it to boolean true
. It is a send , it is just reading or inputing what you wish to send.
ok now I got it.
I did not know that.
so it gets the value from global context and sends it.
My first step to ad a function to write a global was correct.
THX
Except it is more efficient to use a Change node.
However, if you have number of buttons all doing similar things, but with different context variables then you could configure the buttons to send the name of the context variable as a string and feed all the buttons into one Function node that uses the string in the payload to set the correct context variable. Then you only need one function node instead of a number of Change nodes.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.