Difficulty Displaying Related User Data on Wappler's Front-End

Hello everyone,

I would like to ask for some help with my project, where I'm working with a relational database.

I have a data structure with the people responsible for each department, and I want to display their names on the respective department's page (each department has its own screen).

image

In the image below, you can see an example of the "Exploration, Geology, and Mine Planning" department.

image

The fields "responsible" and "accountable" store the user ID from the users table in the database.

I have created a custom query where I pass the department's page ID and receive the relevant information from the database, including the names of those responsible. (I couldn't figure out how to do it without a custom query to return two users. If anyone has suggestions on how to do this in a simpler way, I'd love to hear them).

Now, here comes my main question... What is the correct way to display this data on the front end?

What I tried was creating a server connect action to fetch my workflow and pass the page ID through the input parameters, but I am unable to retrieve the names of those responsible or even the department's name this way.

I'm working with a PostgreSQL database and a Node.js project.

I really appreciate any support in advance!

Did you create GET variables in your Server Connect? It looks like you did based on the parameters shown in the Server Connect

image

Did you tie those GET variables to the SQL Query parameter in the Parameters tab of the Database Custom Query? I use named parameters instead of positional parameters in the screenshot below. In your case, once you click the add button, you should see :P1, then link it to your GET variable in the Expression field.

Thank you for your response,

I have revised some conditions and am now using a single query to fetch all the information, without using GET.

On the frontend, I am trying to pass the department ID to retrieve only the information I need. However, I am not succeeding in displaying this information.

edit: I managed to display the information by transforming the card body into a repeat children element instead of making the container a data detail. It worked perfectly.