The request "/field" used for getting the information of fields.
And in the section: https://www.flexmonster.com/doc/supporting-multilevel-hierarchies/
Described that we need to use Mapping Object to describe the hierarchy relationship between fields.
Can I only use request "/field" to describe the hierarchy relationship between fields, and get the info from our server. And no need to send another request by ourself to get the hierarchy relationship. so we can replace Mapping Object with request "/field".
Hello, Brad Huang,
Thank you for your question.
Yes, as an alternative to the mapping
object, you can define the hierarchy relationship between fields in the /fields
response.
Here is an example of a /fields
response where the "Category"
and "Color"
fields are grouped under the "Item"
hierarchy (with "Category"
as the top level of the hierarchy):
{
"fields":[
{
"uniqueName":"Category",
"caption":"Category",
"type":"string",
"hierarchy":"Item"
},
{
"uniqueName":"Color",
"caption":"Color",
"type":"string",
"hierarchy":"Item",
"parent":"Category"
},
{
"uniqueName":"Price",
"caption":"Price",
"type":"number"
},
...
],
"aggregations":{
"any":["count","distinctcount"],
"number":[...],
"date":[...]
},
"filters":{
"advanced":true,
string: {
members: true,
query: [...],
valueQuery: [...]
},
...
}
}
Please let us know if this works.
Looking forward to your feedback.
Kind regards,
Vera
It works fine with me.
Thanks a lot!