Apple
August 12, 2022, 4:48pm
1
Wappler 5.0.2
NodeJS
Hi,
On Server Actions, if you place a Group step (Output checkbox ticked) with a Set Value inside with the Output checkbox unticked, such variable is not accessible outside the Group step on Server Actions.
Is this a bug? I’m using NodeJS
testVar2
doesn’t show in the JSON response, this means testVar2
is null instead of 123 (Output checkbox is ticked)
@Apple This is very old, but wouldn't it be because you didn't define it as global? And this way it was only in the scope of the group?
Apple
September 22, 2024, 4:03pm
3
Hi Alexandre,
I think not, because testGroup
is defined in the same scope as testVar2
, so everything inside should've been accessible.
@patrick
Now i see!! You not defined output to this element!
Apple
September 22, 2024, 5:04pm
5
Hm... Yes, correct, but in my thinking it should've been accessible to steps inside the Server Action, just not exposed to the browser
(testVar2
has Output checked)
Edit: You may be right, but then this would complicate stuff for me Will see what Patrick says
Thats the way it works, the child scope is lost when ending that scope.
To have it available after then define it as global.