Skip to main content
Solved

conditional layout check on a date

  • December 15, 2022
  • 1 reply
  • 59 views

Forum|alt.badge.img+6

Hi,

I'm trying to apply a conditional layout on a column containing a “best before” date.
I hope to mark it red when the best_before < CAST(GETDATE() AS DATE) but CAST(GETDATE() AS DATE) obviously isn’t a constant…
When creating prefilters I can use a query but that doesn't seem to be an option for conditional layouts?

For now the only solution I can think of is adding an additional column (expression) that contains the beforementioned CAST(GETDATE() AS DATE) and use that column.
It works but I'm not 100% pleased with this workaround 🤔

Best answer by Mark Jongeling

Hi @Alban_T,

Indeed, the only current way to do this properly is by creating a (hidden) expression column that either say 1 or 0 based on the outcome of your query. The Conditional layout will then respond based on that number.

We do have an idea open about allowing a query as Conditional layout condition:

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • Answer
  • December 15, 2022

Hi @Alban_T,

Indeed, the only current way to do this properly is by creating a (hidden) expression column that either say 1 or 0 based on the outcome of your query. The Conditional layout will then respond based on that number.

We do have an idea open about allowing a query as Conditional layout condition:

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings