Get Free Trial

Why is the caption field from the slice overriding my custom captions?

david asked on March 31, 2020

We have a table in our database that maps human-friendly strings that we use to override column names coming out of the data warehouse and display them on flexmonster. We accomplish this by defining the caption in the first record of the JSON object that gets passed to Flex, like so:

"type": "number",
"caption": "City Id"
"type": "string",
"caption": "Product Channel"

Unfortunately, it looks like our slice object also defines an outdated caption in the measures object:


Flexmonster displays this particular field as “Channel” instead of the desired “Product Channel”.
Is this expected behavior? I would think that the first JSON record would override what was in the slice. If it is expected behavior, is there a better way to rename fields?

1 answer

Mykhailo Halaida Mykhailo Halaida Flexmonster April 1, 2020

Hi David,
Thank you for reaching out to us.
Please note that the field caption being overridden by the one specified in the slice configurations is the expected behavior since the slice has a higher priority here. In order to avoid this collision, we would suggest only specifying the caption for the hierarchy in the slice and removing it from the meta-object in your data.
Alternatively, you can also use the Mapping object to define types and captions, as well as many other configurations for your data. Mapping object is a much more stable & convenient way to predefine the structure of your fields and therefore is more preferable than achieving this with the first object of input data or via the slice configurations.
For more details on mapping in Flexmonster feel free to check out the following documentation page:
Please let us know if this helps.
Best regards,

Please login or Register to Submit Answer