GitHub user dosubot[bot] added a comment to the discussion: Native Filter 
values cannot be passed via URL between dashboards due to forced 
native_filters_key behavior

<!-- Answer -->
This is a known limitation in Superset's current native filter implementation. 
When the URL contains a `native_filters_key`, Superset uses this key to load 
the filter state from the backend and ignores any other URL parameters for 
native filters. This behavior is managed by the frontend FilterBar component, 
which updates the URL to include only the `native_filters_key` and removes 
other filter parameters, making it impossible to pass native filter values 
directly via URL between dashboards in the way you described 
[source](https://github.com/apache/superset/issues/35884), 
[source](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx).

There is currently no configuration option or workaround to allow individual 
native filter values to be set via URL parameters when `native_filters_key` is 
present; the key-based approach takes precedence 
[source](https://github.com/apache/superset/issues/36000). The legacy 
`preselect_filters` parameter only worked with Filter Box components and does 
not apply to native filters in recent Superset versions 
[source](https://github.com/apache/superset/issues/35884).

If you need to pass native filter values via URL, you can use the 
`native_filters` parameter with rison-encoded syntax for simple, one-time 
filter configurations (e.g., 
`?native_filters=(NATIVE_FILTER-xxxx:(filterState:(value:('your_value'))))`), 
but this will not work if the dashboard is already using `native_filters_key` 
[source](https://github.com/apache/superset/issues/35884).

For advanced drill-through workflows, custom development may be required to 
support dashboard-to-dashboard filter passing with native filters 
[source](https://github.com/apache/superset/discussions/37095).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/2c24810a-c767-4782-a96b-95b670a8ac5f?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/2c24810a-c767-4782-a96b-95b670a8ac5f?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/2c24810a-c767-4782-a96b-95b670a8ac5f?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/2c24810a-c767-4782-a96b-95b670a8ac5f?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/2c24810a-c767-4782-a96b-95b670a8ac5f?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/2c24810a-c767-4782-a96b-95b670a8ac5f?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/2c24810a-c767-4782-a96b-95b670a8ac5f?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20limitation%20in%20Superset%27s%20current%20native%20filter%20implementation.%20When%20the%20URL%20contains%20a%20%60native_filters_key%60%2C%20Superset%20uses%20this%20key%20to%20load%20the%20filter%20state%20from%20the%20backend%20and%20ignores%20any%20other%20URL%20parameters%20for%20native%20filters.%20This%20behavior%20is%20managed%20by%20the%20frontend%20FilterBar%20component%2C%20which%20updates%20the%20URL%20to%20include%20only%20the%20%60native_filters_key%60%20and%20removes%20other%20filter%20parameters%2C%20making%20it%20impossible%20to%20pass%20native%20filter%20values%20directly%20via%20URL%20between%20dashboards%20in%20the%20way%20you%20described%20%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35884%29
 
%2C%20%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx%29.%0A%0AThere%20is%20currently%20no%20configuration%20option%20or%20workaround%20to%20allow%20individual%20native%20filter%20values%20to%20be%20set%20via%20URL%20parameters%20when%20%60native_filters_key%60%20is%20present%3B%20the%20key-based%20approach%20takes%20precedence%20%5Bsource%5D%28https%3A//github.com/apache/superset/issues/36000%29.%20The%20legacy%20%60preselect_filters%60%20parameter%20only%20worked%20with%20Filter%20Box%20components%20and%20does%20not%20apply%20to%20native%20filters%20in%20recent%20Superset%20versions%20%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35884%29.%0A%0AIf%20you%20need%20to%20pass%20native%20filter%20values%20via%20URL%2C%20you%20can%20use%20the%20%60native_filters%60%20parameter%20with%20rison-encoded%20syntax%20for%20simple%2C%20one-time%20filter%20configurations%20%28e.g.%2C%20%60%3
 
Fnative_filters%3D%28NATIVE_FILTER-xxxx%3A%28filterState%3A%28value%3A%28%27your_value%27%29%29%29%29%60%29%2C%20but%20this%20will%20not%20work%20if%20the%20dashboard%20is%20already%20using%20%60native_filters_key%60%20%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35884%29.%0A%0AFor%20advanced%20drill-through%20workflows%2C%20custom%20development%20may%20be%20required%20to%20support%20dashboard-to-dashboard%20filter%20passing%20with%20native%20filters%20%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/37095%29.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37622)

GitHub link: 
https://github.com/apache/superset/discussions/37622#discussioncomment-15678699

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


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

Reply via email to