Hi ya support,
We have datasets with many fields which are stored hierarchically. For instance:
Form Name 1: {
field_1: value_1,
field_2: value_2,
},
Form Name 2: {
field_3: value_3,
field_4: value_4,
field_1: value_1,
}
We'd love to be able to display the fields hierarchically in Flexmonster field selector so the inner fields are grouped under a header. Ideally, we'd like the header to be sent up with the fields since the field names could technically overlap (like field_1 in the example).
Any way of doing this?
Thanks!
Patrick
Hello, Patrick,
Thank you for writing to us.
Please kindly consider flattening your data, for example, changing the structure from:
{
FormName1: {
field_1: value_1,
field_2: value_2,
},
FormName2: {
field_3: value_3,
field_4: value_4,
field_1: value_1,
}
}
to the following one:
{
FormName1.field_1: value_1,
FormName1.field_2: value_2,
FormName2.field_3: value_3,
FormName2.field_4: value_4,
FormName2.field_1: value_1
}
Then Flexmonster's data types could be used to group the necessary fields under the corresponding header.
To achieve this, we kindly suggest specifying dimensionUniqueName
and dimensionCaption
(optional) for the necessary fields via mapping
.
As a result, in the Field List, the specified fields will be grouped.
We have prepared a JSFiddle illustrating the suggested approach: https://jsfiddle.net/flexmonster/ar5xwf0t/
For more information about the mapping
object, please see the following guide.
Please let us know if this helps.
Looking forward to your reply.
Kind regards,
Vera