Get Free Trial

Format specific column via toolbar

Lucas Correa asked on July 28, 2020

Whenever I format a cell via the toolbar, the report gets updated with a new format object in the formats key. However, it comes with a random name like -11jfvu8v8cao00” so I wonder how can I relate this name with the specific measure in the measures key. Also, this is not an issue when it comes to conditional formatting as it stores the measure in its condition object. 
Example of conditional formatting:
{“formula”:”#value < 0″,”measure”:”inj_games_missed”,”format”:{“backgroundColor”:”#FFFFFF”,”color”:”#000000″,”fontFamily”:”Arial”,”fontSize”:”12px”}}
Example of format cells: 
Both were applied to the measure with the uniqueName of “inj_games_missed” but only in the conditional formatting I can know to what measure it relates to. 
Is there a way to make the format cells function behave like the conditional formatting? Is this a bug?

2 answers

Illia Yatsyshyn Illia Yatsyshyn Flexmonster July 28, 2020

Thank you for reaching out to us.
Our team would like to explain that the generated value of the name property will be used as a reference to the corresponding Format Object. Such a name will be specified as a value of the format property for the corresponding measure automatically.
Please see the following code snippet for the reference:
Format Object:

    "name": "-74kdvekdsxj00",
    "decimalPlaces": 1,
    "textAlign": "left",
    "isPercent": true

Corresponding element of the measures array:

"measures": [
    "uniqueName": "inj_games_missed",
    "format": "-74kdvekdsxj00"

As a result, connections between measures and corresponding Format Objects can be retrieved as well.
Moreover, such an approach allows establishing one to many relationship between several measures and a single Format Object.
We hope it works for you.
Please contact us in case further questions occur.

Lucas Correa July 28, 2020

Thanks for the quick response, I had missed the format key in the measures object. All good here now 🙂

Please login or Register to Submit Answer