Hello,
I have a question about multilevel hierarchy. It is in the attached file.
Thanks.
Hello, Heejai,
Thank you for your question.
We would like to confirm that the "and"
filter type is correct in this scenario. This is because Flexmonster makes several /select
requests targeting different parts. As a result, the visualization on the grid is achieved through several /select
requests.
For example, in your scenario:
/select
request to display the filtered data."QLD"
, Flexmonster sends another /select
request, this time targeting the drill-down action./select
request for the drill down. We can see that the filter first focuses on getting data for the drilled hierarchy member "QLD"
:
"filter":{
"type":"and",
"value":[
{
"type":"and",
"value":[
{
"field":{"uniqueName":"description_state"},
"include":[{"member":"QLD"}]
},
{...}
]
}
]
}
Next, the filter provides additional details about the surrounding members that can be used to help ensure the filter accuracy:
"filter":{
"type":"and",
"value":[
{
"type":"and",
"value":[
{...},
{
"field":{"uniqueName":"description_state"},
"exclude":[
{"member":"ACT"},
{
"member":"NT",
"filter":{
"field":{"uniqueName":"description_settlement_type"},
"include":[{"member":"metro"}]
}
}
]
}
]
}
]
}
With this in mind, the "and"
filter type is correct in this scenario.
We hope this helps. Please let us know if any additional questions arise.
Kind regards,
Vera
Thanks for the answer.
How about "or"? I've never seen the case "or". When can I see it?
Hello, Heejai!
Thank you for quick response.
The "type: or"
filter query is sent when it is not clear to which hierarchy level the filter is applied.
Here is an example of a filter inside Flexmonster component, which will trigger sending a request with "type: or"
. This filter will select the members that start with "b"
:
filter: {
query: {
begin: "b"
}
}
Please refer to this example: https://jsfiddle.net/flexmonster/8uv15b34/.
In this JSFiddle, the hierarchies are shown when the top-level hierarchy "Category"
OR bottom-level hierarchy "Color"
have a label starting with "b"
.
Please let us know if this helps to clear things up. Looking forward to hearing from you.
Best Regards,
Maksym
Hello, Heejai!
Our team is wondering if our response helped you to understand the purpose of "type": "or"
requests in Flexmonster custom API communication protocol. Please let us know if it was helpful.
Best Regards,
Maksym