When Caption is defined, the getFilter / setFilter members array seems to require using the caption
hierarchyCaption.[value]
rather than
hierarchyUniqueName.[value]
Keeping it as uniqueName whether or not caption is not set would make more sense...
(Either way, it's also not clear in your documentation what should be used. can you make it more explicit?)
e.g. https://www.flexmonster.com/api/getfilter/
It appears also that if there is only one member of a hierarchy, then getFilter will return null no matter what. Also would be good to document that if that is true.
Thank you
Hello, Michael!
Thank you for reaching out to us.
About getFilter/setFilter behavior
We appreciate your mentioning that it may be unclear that you should use the uniqueName
instead of the caption
. We have already updated our getFilter/setFilter documentation.
Please note that Flexmonster is using the hierarchies uniqueName
inside of getFilter
/setFilter
methods. Please see this JSFiddle example, where getFilter(uniqueName)
returns applied filter while getFilter(caption)
returns null
: https://jsfiddle.net/flexmonster/3Lgpu5yb/.
In case of hierarchy with one member, the getFilter returns null
We want to explain that this behavior exists because, in the case of the field with one member, there can be two filtering options:
members
filter with no members. However, Flexmonster will still display the member on the grid.As a result, the getFilter
always returns null
on members
filter as there are no available filtering options. But you can still use the query
filter, and the getFilter
API call will return it.
Feel free to ask if any further questions arise.
Best Regards,
Maksym
Hello, Michael!
Hope you are doing well.
We would like to know if we successfully addressed your question and clarified both points about getFilter
/setFilter
API calls.
Best Regards,
Maksym
You've made it more clear that one member won't show anything on getFilter, but it may benefit your users to document the behaviour on your documentation pages. https://www.flexmonster.com/api/getfilter/
thank you
Hello, Michael!
Thank you for your feedback.
Our team will consider the idea of documenting the described behavior of the getFilter
API call.
Best Regards,
Maksym