stevensuting opened a new issue #12324:
URL: https://github.com/apache/superset/issues/12324


   **Describe the solution you'd like**
   Currently Superset allows us to set static default values to the filter box:
   <img width="297" alt="Screenshot 2021-01-07 at 1 07 35 PM" 
src="https://user-images.githubusercontent.com/8875448/103864959-76765280-50e9-11eb-8b32-88224d511b97.png";>
   
   What I would like is for this value to be dynamic based on some condition 
set via SQL.
   For example, we have a column called Team with values (David's Team, Jack's 
Team, Tim's Team)
   Team is used on a Filter Box for a dashboard.
   - When David logs in, the value on the filterbox should be David's Team
   - When Jack logs in, the value on the filterbox should be Jack's Team
   
   A sample SQL for this could be:
   `SELECT team_name from table where manager_name = '{{current_username()}}'`
   
   **Describe alternatives you've considered**
   A potential unclean solution that uses url parameters, like
   http://localhost:8088/superset/dashboard/1/?preselect_filters={"1": {"Team": 
"David's Team"}}
   http://localhost:8088/superset/dashboard/1/?preselect_filters={"1": {"Team": 
"Jack's Team"}}
   
   Using Ngnix+Lua to do a URL redirect when a particular user logs in
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to