Here is a data source config example:
Is there a data type boolean or formatting setting for it? Couldn’t find it in mapping object.
Thank you for posting your question.
Flexmonster does not provide a separate field type for boolean values. Instead, by default, they are recognized as regular string fields.
Please let us know if this helps.
What is the best approach to instead of displaying “true” or “false” we display a friendly format like “Yes” or “No”
Thank you for your response.
The preferable approach in this situation is to modify the data source so that it already contains the “Yes”/”No”-value field you want to display.
However, it becomes easier if you’re using inline JSON data as your data source: you can set up a data preprocessor on the client-side that will add the necessary field to the data before feeding it to the pivot table. This way, the original data stays unchanged, but it is also displayed as necessary in your Flexmonster instance.
Here’s a quick example demonstrating this approach: https://jsfiddle.net/flexmonster/ru6fz1vj/.
Hope this helps!
That’s what I was trying to avoid. Wanted to see if there was something built-in related to data formatting.
Thanks for quick response
I just realized there’s a much simpler solution involving the
customizeCell() API call.
It does not require you to modify the input data – instead, you simply rewrite the cell labels in the grid without affecting the underlying data.
Here’s a sample for demonstration: https://jsfiddle.net/flexmonster/w6uvf3Lm/.
Does this solution suit you better?
That’s the one I went for.
Thanks a lot for the follow up 👍