rscarborough1996 commented on issue #16942:
URL: https://github.com/apache/superset/issues/16942#issuecomment-1406870600
I am having the same issue in 2.0.0, although my use case is different.
I am displaying a report via a table-valued function like so:
```
{% set operatorId = 'DEFAULT' %}
{% if filter_values('operatorId')|length == 1 %}
{% set operatorId = filter_values('operatorId')[0] %}
{% endif %}
SELECT * FROM [dbo].[myFunction]({{ operatorId }}, '{{ from_dttm }}', '{{
to_dttm }}')
```
The report runs fine, but when I try to create a filter for operatorId, I
get the " bad request" error, like in the image above.
I can partially fix this by setting defaults for these values like this:
```
{% set fromDttm = '1753-01-01 00:00:00' %}
{% set toDttm = '9999-12-31 23:59:59.997' %}
{% if from_dttm is not none %}
{% set fromDttm = from_dttm %}
{% endif %}
{% if to_dttm is not none %}
{% set toDttm = to_dttm %}
{% endif %}
```
But, the problem then is that the filter returns every possible value for
operatorId, even those that don't exist in the chosen time range. It would be
nice if the filter would respect from_dttm and to_dttm.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]