We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Display Filter Values by Caption

Answered
Leo Chan asked on March 5, 2024

Dear Flexmonster Team,
Can I display the filter values of a field by its caption?
For example, I have the following array of objects:
[
    { id: 1, description: "red"},
    { id: 2, description: "blue"},
    { id: 3, description: "green"}
]
And the following data array:
[
    [ 'Color', 'Count' ],
    [ 1, 1200 ],
    [ 2, 1600 ],
    [ 3, 1900 ]
]

How can I display "red", "blue" and "green" on the pivot table with built-in functions?

Thanks,
Leo

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster March 6, 2024

Hello Leo,

Thank you for reaching out to us.

The best approach for such a use case would be to preprocess data before passing it to Flexmonster. For example, it can look like this:


    ['Color Name', 'Color', 'Count' ],
    ["red", 1, 1200 ],
    ["blue", 2, 1600 ],
    ["green", 3, 1900 ]
]

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Please login or Register to Submit Answer