Server Connect Actions output data explained

I’m becoming familiar with Wappler and for the main needs are already well under way
But I have a doubt. I did not understand the use of these two command. I do not understand when and why they must be activated, since they normally do not seem to be decisive.

Button

Dear Marzio,
the first one (the chain) make you this step a file on its own. For example: connection to a database, you must click on the chain image then the file with connection details will not be only inside the script you are doing but it will be a file on its own and will be available for all other serverconnect scripts.

Or if you have a query that you must repeat inside different server connect script, you can click on the link (chain) button and it will be available for all the scripts.

About Output, better other make their explanations :wink:

2 Likes

As for the output - every server connect action step - can produce output data.

If it is a query - it will be the query results, if it is an insert action - it will be the inserted id.
In the delete action above is just a number of the records deleted.

So output sets if you want to include this data in the complete output of the whole action, or ignore it.

If you have additional data processing, for example you want to tweak the data of a query or reformat it or just use it in a loop within the same server action, then you don’t want to display its output.

But if you just want a query and use directly its data, then you should just set the output on.

You can also easily see the whole output of the Server Action - if you call it directly in the browser. It produces a JSON output having all the data that is returned.

This is the data that is then available on your web page for dynamic rendering with App Connect data binding.

2 Likes

Server action are actually external php file.
When you save a server action, a file is created with a definition of the connection and query encoded as a php file.
The link icon shows that your connection is correctly linked to that action file.
This is best highlighted when selecting a connection. Each set of connection are saved in file. When you click the folder icon, it list all the saved connections and when the appropriate one is selected the link icon shows it is linked. You can view them in /dmxConnect/module/connections
Not all server actions generate an output, some do, some return a value rather than a field name (for example an insert returning the new id).
The output check box signifies if the output of the server action should be passed back to an app connect connection or not (no point in passsing back info if not needed)
Does that help?

(sorry took so long to type that others have now answered)

1 Like

Thanks to everyone, it is clearer to me now
But I have another question, not necessarily important, but I would like to know
Why in the tutorials using Query / Open in Browser the full text is displayed with wrap, while to me is a text compressed without a wrap?
In the first case it is more possible to check the result of the query