Sub table in a table?

Hey all,

I had a question about how to add a sub-table inside a table (if possible) with an opening/closing toggle. Something like this:

Alternatively, I'd like to know how to make this data more consumable:
image

Is there any way to make it only show one number per row? (hopefully ascending/descending)

Really need some help and would appreciate any suggestions or help :slight_smile:

Love this tool!

@ritvik_singhvi Welcome to the forum!
For your first question regarding a subtable..
I have not seen a way to add a table in a table... but you could use a modal to a button to open a modal for each row where you can then display that data.
As per your second question, I don't quite follow your comment about making the data more consumable. Having one number per row would make it a single column, no?

If you're not using all the features of a table (sorting/filtering etc) you could use nested list views, something like this:


forum (1).json (6.4 KB)

right now it is an array and the array is being displayed this way, i need to make look at it in one number per row or any other format because right now it is just a huge list of numbers

default the column is like this:
image

when i hover on a row it looks like the above screenshot

i can make changes to the database/query so all suggestions are welcome!

I'll checkout modal! thank you

need all the features of the table but i need exactly a list view inside the table.

Modal seems like a good option, is there a way to add a modal to the buttons that show up in the table?

the buttons on every row of the table those ones

Yes, add a custom column and select type modal - but that will not allow you to customize the size of the modal. Instead, do the following:

Drag a new modal component into your app and set Hidden to true (I didn't only to show you what to do)
Then, in the table use an Action and in the Action select Run Query. (You can also remove the Action title of the Actions column)
Add a new JS Query (query34) that will open a modal
modal2.open();

this seems like a good idea, but the data in each row will change and this modal will only show fixed set of data, i cannot do {{currentrow}} or something inside the modal.

Also, there is a modal column in the table but how do i select the data which is to be shown in that modal? I only get a blank modal compared to when i add a modal button it says "drag elements from the right panel"

edit: it is just missing from the UI, dragged a table and it got pasted there

How do I make the data in the table opened via modal dynamic on a per row basis?

You can do the same for the modal column but you can still use the modal component as I originally suggested and populate any component dragged into the modal like a username form field by setting that form field to be {{yourtablename.selectedRow.data.username}}

thanks scottR, i am using this and seems to be working great!

I had another question, there is no body field available for my rest API, how do i add a body?

You have to use POST if you're posting data otherwise you can add URL parameters when using a GET.

but i want to make a get call and in that get call it requires a body, is there no way to add that?

The API should define what the parameters and methods are. Your API doesn't seem to support BODY when using a GET otherwise it would be available. Using BODY in a GET seems unusual to me (IMO). Using URL parameters would be the solution if security isn't a concern (Assuming here you're also under https...