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).
In the image below, you can see an example of the "Exploration, Geology, and Mine Planning" department.
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!