Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.

Conditional Formatting

Answered
Andrew R Fox asked on July 20, 2024

Probably a dumb question: is it possible to change the order of the conditional formatting? In my experience, I have to put things in the right order of operations or they dont' get applied correctly. 

5 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster July 22, 2024

Hello, Andrew!

Thank you for reaching out to us.

Kindly note that on the UI, conditions are shown in the order they are stored in the report object. When adding a new condition from the UI, it goes to the top of the list. In the code, all the conditions are stored as an array of conditionFormatObjects and can be reordered using a couple of our API calls.

Please let us know if the suggested approach of reordering conditions from the code would work for your case. If so, we'll prepare an example illustrating the approach.

Looking forward to hearing you.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster July 30, 2024

Hello, Andrew!

Hope you are doing well.

Our team is wondering if you had some time to check out our previous letter. Could you please let us know if the suggested approach of reordering conditions from the code would work for your use case?

Looking forward to hearing your feedback.

Kind regards,
Solomiia

Public
Andrew R Fox July 30, 2024

Thanks, yes. Does the order in which they appear also infer the order in which they are applied? I'm seeing some oddities which is why I ask.

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster July 31, 2024

Hello, Andrew!

Thank you for your swift response.

Kindly note that in Flexmonster in case conditions are overlapping, the condition that was created first would have more priority than the newer one.

We have prepared the JSFIddle to show how to change the order of the conditions from the code: https://jsfiddle.net/flexmonster/z8ejL72t/.
You are welcome to read more about the API calls used in the example in our docs: https://www.flexmonster.com/api/methods.

Hope you will find our answer helpful.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster August 7, 2024

Hello, Andrew!

Hope you are having a great week.

Just checking in to ask if you had a chance to look through our example with changing conditions order from the code.

Feel free to ask if you have any further questions about conditional formatting.

Kind regards,
Solomiia

Please login or Register to Submit Answer