Skip to main content
Nintex Community Menu Bar
Question

Is it possible to render calendar source background color according to a condition?


Forum|alt.badge.img+7

If a certain field in the event source is blank render a different color. i.e. In event display and background color settings in calendar source properties:
91caac928db8c00f3231bf88f9f5080ab738fa99.jpgif {{AccountId}} isBlankValue then #FFFF00 else #00000

?
Thanks.

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

4 replies

Forum|alt.badge.img+13

I think you can do this with Mustache merge syntax, yes, but the easiest way to do this would be to define a Formula Field, and then have your Background Color be determined by the Formula Field, e.g.

Background Color: {{CalendarColor__c}}

Where CalendarColor__c is a Formula Field you define in Salesforce, whose output is a Color, e.g. 

IF(ISBLANK(AccountId),“#FFFF00”,“#000000”)


Translate

Forum|alt.badge.img+7

Thanks Zach… This opens up so many possibilities. I feel like Picasso on a blank page LOL

Translate

Forum|alt.badge.img+5
  • 28 replies
  • July 9, 2024

Would you please show us how to show it within merge syntax without bothering formular field? Thanks

Translate

Forum|alt.badge.img+13

Sure, you can do it with merge syntax but I would highly recommend adding a Ui-Only Formula Field on the Model (NOT a Salesforce Formula Field) rather than using merge syntax, as it’s much cleaner and more understandable.

Ui-Only Formula Field approach:

Background Color: {{CalendarColor__ui}}

Where CalendarColor__ui is a Ui-Only Formula Field in the Model whose value is IF(ISBLANK(AccountId),“#FFFF00”,“#000000”)

Merge Syntax approach:

Background Color: {{#AccountId}}#FFFF00{{/AccountId}}{{^AccountId}}lightgreen{{/AccountId}}

Translation: If we have an AccountId, color is #FFFF00, otherwise #000000

Either of these hard-coded values (e.g. #FFFF00 or lightgreen) can be substituted for a dynamic field value, e.g. {{CalendarColor__c}}

Translate

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