-
I'm creating a drill-down page where I show a "master" table with hyperlinks that self-reference the page using I've seen the discussion / ticket (#142) to create a subquery with Thoughts? See: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We can do conditional selects for the detail table: select
'table' as component
where coalesce($drill_param, '') <> '';
select
name,
dob
from users
where coalesce($drill_param, '') <> '' and users.cohort = $drill_param; This approach requires putting the condition in both places - the component selection as well as data selection. Alternative, is to use a card with embed: select
'card' as component,
1 as columns;
select
'Users' as title,
'/users_table.sql?_sqlpage_embed' as embed
where coalesce($drill_param, '') <> ''; Where the users_table.sql has the SQL for rendering the users table. It will be fetched and injected into the page after load if the $drill_param variable is not empty. |
Beta Was this translation helpful? Give feedback.
We can do conditional selects for the detail table:
This approach requires putting the condition in both places - the component selection as well as data selection.
Alternative, is to use a card with embed:
Where the users_table.sql has the SQL for rendering the users table. It will be fetched and injected into the page after load if the $d…