Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow Scoped Smart Variables #477

Open
justwiebe opened this issue Jul 4, 2024 · 0 comments
Open

Allow Scoped Smart Variables #477

justwiebe opened this issue Jul 4, 2024 · 0 comments

Comments

@justwiebe
Copy link

Thanks for such a great library! A feature that would be really great to add would be scoped/nested variables.

We would like to have a dashboard for "Users", but there are a lot of users in the system, so I would like to first scope the users to a specific account to make that more manageable.

This would be the smart variables definition. I would expect the user_id dropdown to be empty until I select an account_id, in which case user_id would be populated.

    smart_variables:
      account_id: 'SELECT DISTINCT a.id, a.name FROM accounts a'
      user_id: 'SELECT DISTINCT u.id, u.email FROM users u WHERE u.account_id = {account_id}'
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant