Return a list with names

Hi there,

I am new to Xano so apologies in advanced if the question is a bit trivial, but I attempted a few times and watch several tutorials and still don’t know how I can solve my issue. Hopefully someone can point me in the right direction.

I’m building an app with Bravo Studio for an oncology project in which I have to:
(1) Return a list of all records → this is working just fine
(2) Return a list of all records based on the element clicked on the previous step 1 → I need help here

I have two tables:
(1) Tumors
(2) Subcategories of those tumors with some additional info

On the API request I need help with I’ve included an addon with the information from the other related table. I need to return the list of subcategories reference to a tumores_id input. The return json I received seems to be an object within an array. Attached there is a screenshot of the returned Json payload.

In my case, “PULMÓN” has 3 subcategories:

  • Carcinoma mitocritico
  • Carcinoma epidermoide
  • Adenocarcinoma

How can I return those into a list?

I hope I explain my issue correctly, appreciate some help.

Hi @Javier_GrowthLab welcome to the forum and thanks for your first post!

To clarify:

Are you trying to return 3 separate lists (one for each separate subcategory of PULMÓN)?

Or are you trying to return 1 list that includes all 3 subcategories?

Hi Michael,

Thank you for your reply. My goal is to return 1 list with all 3 subcategories.

How can I accomplish that? Maybe using an array function inside the GET request? That was my first guess.

Hey I made a quick tutorial example for you. I wasn’t 100% clear on what you are trying to accomplish, but depending on what that is, I might take example 2’s approach: query the subcategories and then use the by Custom query filter where the tumor_id IN subcategories.tumor_ids

Let me know if anything is not clear or I missed the mark on what you were asking for.

Hi Michael,

I truly appreciate your explanation. I’m gonna try both examples and see if I get the outcome I want.

Also, thanks for the last note regarding the database structure, I’m new to Xano and I’ve just copy the structure from the Airtable base, but maybe I’m not framing the problem well. Again, thanks for your inputs.

Hi Michael,

It worked!!! Option 2 was the winner → Query all records from Subcategories and specifying the tumor_id as the parameter.

Thank you for your help :slight_smile:

1 Like