Accessing the (first) record of a filtered interactive table

Hi all,
need some advice.
I have an interactive table in my app where I set a filter by a variable.
How can I access the shown result? The placeholder is empty until I select a record in this table.

But I need this information without user interaction. At the moment my idea is to use a new query and table aggregation to get the information I want, but I’m hoping there is a more efficient way.

Any idea?

Regards Chris

Hello Chris,

Currently the only way to do this is with the method you described. You will need to create a sorted query with a limit of 1 record and then use the Mode aggregation to get the “first” value of your query. Then use trigger logic to load the ID from that aggregation into the record placeholder on step enter. I wish it wasn’t so awkward.

Best of luck,

1 Like

Thanks Daniel,
That’s what I was afraid of.

Do you have a idea how this can be included?

Regards Chris

Hey @ChrisF, I’d like to understand more about your concrete use case.

Would be up for a quick chat about what you are building?
If yes, I would be great if you sent me a quick emailto stefan(at) so we can coordinate a time.

Best and looking forward to chatting,

Hi @stefan,

I also ran into similar situations before.
It is about, that the variable behind an interactive table widget contains everything from the source, also when the table is filtered and sorted.
There is no (decent) way to access the sorted and filtered result.
When the source is a Tulip Table or an SQL database, there is a way to change the query (but depending on the use case, you have to call the data at least twice for all and filtered, also performance can be an issue).
But on App building and maintenance perspective, it would be nice to be able to “access what you see”.
The filters of a interactive table widget are easy to use and powerful (okay they miss mixed and & or combinations) and it would be awesome to access the result (whats shown) in a trigger as well.

The widget has a source variable and a selected record variable. An additional “filtered and sorted (whats shown) variable” would do the trick…

And if its only one Value you can directly move forward without user interaction (Whats the point of “choosing” betwenn one option(s)? :wink:

1 Like