Get Free Trial

Conditional formatting with formula not working with custom datasource api

Ilaria asked on June 25, 2021

I would like to report an issue about conditional formatting with formula.
The same JSFiddle posted in How can I conditionally format a column based on row value won’t work with custom data source api. 
I modified the .netCORE sample of the custom datasource API found in A quick overview of a sample .NET Core server by adding two conditional formatting:

"conditions": [{
"formula": "#value > 10000",
"format": { "color": "#FFEB3B" },
"measure": "Price"
"formula": "#value > sum('Price')",
"format": { "color": "#FFEB3B" },
"measure": "Quantity"

The first one is working, whereas the second one is not applied.

Thank you!

4 answers

Mykhailo Halaida Mykhailo Halaida Flexmonster June 25, 2021

Hi Ilaria,
Thank you for posting your question.
This is a known limitation caused by how the custom data source API works – it does not retrieve other measures’ values when processing conditionals, meaning you cannot use other fields in formulas.  
Please let us know if there is anything else we can help you with.
Best regards,

Ilaria June 28, 2021

Hi Mykhailo,
is there any chance you will plan this feature in your roadmap?
Thank you!

Mykhailo Halaida Mykhailo Halaida Flexmonster June 29, 2021

Our team will take a look at this to estimate whether this functionality can be implemented with the current component structure – we’ll return to you with results on ETA Jul 26th.
We’ll keep you posted!

Vera Didenko Vera Didenko Flexmonster 4 days ago

Hello, Ilaria,
We are happy to inform you that the issue with not applying conditional formatting if a formula contains a reference to a measure was fixed (see JSFiddle example).
This is available in the latest (2.9.4) version of Flexmonster:
You are welcome to update the component. Here is our updating to the latest version guide for reference.
Please let us know if the update works fine for you.
Kind regards,

Please login or Register to Submit Answer