Modify CSS as per condition

Hey Everyone,

I have a table widget that contains all the dates of the selected month and year along with some other data to display and I have a entity "Holidays" that contains all the holidays in the year. What I want to do is change the background color of the row(s) that is a holiday (corresponding to the date and the date in the holiday entity). Like for eg: 

There is a holiday marked on 15th August in the Holidays entity , then the background color of row that contains the cell which have 15th August date should be changed. How can I do this

@Anshul Jain

I understood your question.

you have to add css class on Row cell like this, 

If((Date  = "Holiday", "HighlightHoliday","")

"HighlightHoliday"  is a class which you need to mention in screen's CSS or Theme level

I hope this might help
If possible share your oml here


If((Date  = "Holiday", "HighlightHoliday","")  don't you think this will compare each date to only one holiday record in the entity? Each date should be compared to every holiday present in the table , if dates matched then color should change otherwise let it be the same. I haven't tried this just speculating. Thanks


You need to work around around on Css, there are different approach to achive this

  • On the Table that you want to change the color have foreignkey or some data on which you have to change color.
  • On you Style Sheet you need to define a class with the Css property you want to achieve.
  • Then go to column and on that coloum property you will see a style field.
  • On that field you have to apply your condition.

I have attached the Sample and Oml you can take a reference from it

Sample Screen

Hope this helps



I can't alter the entity structure as per the requirements ( as you said create a relationship). Is there any other way do this?. For reference :  I have a day entity that contains days (Integer attribute) from 1 to 31 and a Month static entity that contains all the months along with the no of days in them. So when the user picks a month record in the month gets updated and in the day aggregate the filter performs as Day.days > 1 and Day.days < Month.noofDays. User can off course pick year as well and that's how I am making the date by combining all three (day month picked (month.record) and year picked) 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.