Wappler Version: 7.6.2
Operating System: W11
Server Model: NodeJS
The title might be a bit confusing, so here are some images along with how to reproduce:
In the example below, there is a simple database query that grabs data from a database, with a set value step to output the ID from a table in the query.
No data will be outputted. This is the same if the test set value step is also in its own group.
Note: This only affects query steps from what I can tell. If I target a set value step inside of a group, the data outputs correctly as it should. E.g, the below works, because its getting the data from the step value step that can be seen in the above screenshot.
Set Value steps inside a Group Step are scoped to that group. They can only access data from steps inside the same group, and the values they create don’t exist outside of it.
To access the value outside the Group, add Global Name for the Set Value step. You can give it the same Global Name as Name or use a prefix such as g_pirep_id and then reference to this Global Name outside the Group.
I think you might've misread the post. The set values steps here are to output the data from the query in a group to demonstrate the issue, it's not about the set value steps themselves (although they actually have the opposite effect to what you mentioned with groups, that's only if they're in something like a repeat as far as I can tell, they don't need a global name for groups)
Edit: Made it clear in the original post that the second part is targeting the query, not the set value step.
You can't access the internal scope data within child scopes like with groups and repeats. You can only access data that the action returns, so the sub actions that have output enabled. You don't have to enable output for the group itself to make the children accessable.
In your example enable output on the getPirep query action, you can disable output on the pirep_details group if you don't want it in the API response. You can now access pirep_detail.getPirep.pirep_id from outside the group.
Enabling output inside the group will make it available outside of it, it will not be visible in the API response when you do not enable the output of the group itself which make it only available within the parent scope.
This is intentional on my part. The group is intentionally set to output, and then set values are set from the database query to output under it. I do this because I'm making some of my API end puts a publicly available API, and it's a good way to organize the data.
The placement of the getPirep query is in the group purely for my own organization when editing a serverconnect in Wappler, as there are 3 groups in the example server action, and just to keep things organized I put them in the group where there are relevant output steps.
So to confirm, it's expected that:
If a query or setvalue step in a group has its output disabled, it cannot be accessed outside that group by other serverconnect steps
If a query or setvalue step in a group has its output enabled, it can be accessed outside that group by other serverconnect steps
Would that be accurate? I know that's how it works with things like set value in repeats (where there isn't a global name set), but I wasn't sure if this is how it's meant to work for groups, as I thought those only changed the way the data would be displayed on output when actually viewing the api endpoint in a browser or similar, and not within the serverconnect internal data structure itself.