Hi, is there a way around getting the list of filt...
# gooddata-ui
p
Hi, is there a way around getting the list of filter values selected? For example, if we have a filter
id
with value as
Except a, b
. I want the list of all the values except a and b. I know of one workaround by calling the attributes API. Looking for a better solution.
r
Hi there, can you give me an example of your filter implementation? In most cases, the easiest would be to get the filter values from the onApply callback function, but if this doesn’t apply here, I’ll take a look further 🙂
p
Hi Radek. I’m trying to get the filter values without AttributeFilterButton component. I guess execution api is the only solution.
b
@Radek Novacek in "onApply" callback function, it only provide me the unselected values in case of negative filter, but i want all selected values. is it possible?
👀 1
j
@Bhupesh Mittal Hi Bhupesh - I’d like to check in, since this community post didn’t get answered. Is this still an active problem for you?
b
Yes @Jan Rehanek, i need to make a API call every-time to get the selected values. It will be easier if i can get all selected values in "onApply" callback function.
Also is there any way to show single date picker in Date Filter rather than a Range?
j
Will check. Please hold on.
I think the fact that the notIn elements are returned in onApply is baked into how the negativeAttributeFilter works, but let me check with the SDK team. Maybe there’s a better way.
p
There can be ten of thousands of attribute elements. That is the reason why positive and negative filter is used. In the case when you unselect everything and just select few values, positive filter is used and positive selection is saved. When you leave everything selected and just unselect some values, these are saved. Otherwise, AFM execution that use these filters would be very very large if it would use other type of filter in the reverse case than I described.
If you really need all the values, you can either use attribute get valid elements API or possibly do a execution (get all attribute values from particular label and possibly apply attribute filter to filter out values that you don’t need).
b
Thanks @Petr Dolejsi @Jan Rehanek Also is there any way to show single date picker in Date Filter rather than a Range?
p
IMHO it is not
b
is there any way to get chartConfig by insight id?