Skip to main content
← Data, API & Backend
Data, API & Backend February 21, 2023 · 2 replies

What is a good approach to find reference data in the table?

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

Could you pls advise me on a good approach to find data hardcoded in the table? (xano)

In our app we have a data-table with references - names of the areas (see TABLE). The list of the areas will remain the same, but we can change how to name them. 

So we created a get API: "area_names/${area_names_id}"

We would like to display on a screen (see PAGE) the name of the 1st area, 2nd one, ... based on values from the TABLE.

Is it possible to use a get-api request "area_names/1", "area_names/2", ... directly from the screen? How should I proceed in this case? Should I use custom variables? ${area1_id}=1, ${area2_id}=2, ... But how and where can I define and use them?

Thanks in advance!

question-API-variable-Feb.jpg

2 replies

Simeon February 21, 2023

I would suggest your API should be doing more of the work here. It looks like your My Profile screen is returning a list of areas, and the level of experience?

I would have a single API call for My Profile, which then does a join across the database tables and returns an array in the format:

[{"area":"Scrum Mastering", "level":"Expert"},  {"area":"Agile Coaching", "level":"Beginner"}]

And then if you had a list container in Bravo it could just loop through these results.

Sergiy February 22, 2023

Thank you very much! I'll think how to implement this approach. Honestly said, we don't have developers in the team and implementing our MVP without knowing patterns... just a basic understanding of development approaches 😃 So your answer is an important input for us!

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord