Get Free Trial

Conditional formatting with formula not working with custom datasource api

Re-Open
Ilaria asked on June 25, 2021

Hi,
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!
 
Ilaria

6 answers

Public
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,
Mykhailo

Public
Ilaria June 28, 2021

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

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster June 29, 2021

Ilaria,
 
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!
 
Regards,
Mykhailo

Public
Vera Didenko Vera Didenko Flexmonster July 27, 2021

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: https://www.flexmonster.com/release-notes/.
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,
Vera

Public
Vera Didenko Vera Didenko Flexmonster August 2, 2021

Hello, Ilaria,
 
How are you?
 
Just checking in to ask if you’ve had a chance to try out the latest fix.
Does everything work fine for you?
 
We would be grateful for your feedback.
 
Kind regards,
Vera

Public
Ilaria August 11, 2021

Hi Vera,
the fix works fine!
thank you!
Ilaria

Please login or Register to Submit Answer