Skip to main content
Nintex Community Menu Bar
Solved

Formula to conditionally color V2 calendar event source

  • July 11, 2024
  • 5 replies
  • 49 views

Forum|alt.badge.img+7

What’s the formula format to color v2 calendar as “result of template”?

Looking for the ability to vary color based on owner ID

If({{OwnerId}}=xxxxxxxxxxxxxxx, #32a852, IF{{OwnerId}}=yyyyyyyyyyyyyyyyyyyy, #32a852, …

Best answer by Rob_Hatch

The template can just call a UI only field on your calendar model. I’d recommend using a a Case Function in that UI Only formula field.

Read the docs about Case Function here.

https://docs.skuid.com/latest/en/skuid/formula-function.html#text-manipulation-and-analysisThe formula might look like this.

CASE(
  {{OwnerId}},
  "Id1", "Color1",
  "Id2", "Color2",
  "Color3")

The last value is the default value in case none of the user values are found.

The Color can be Hex, or an named html color value

WARNING: This solution will be fragile and will require you to edit the skuid page every time you have a new team member who needs a special color. I’d recommend adding a custom field to user object. (with a default value). This “User Color” field could be included in your skuid model for the calendar and would be used in that template.

5 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • Answer
  • July 12, 2024

The template can just call a UI only field on your calendar model. I’d recommend using a a Case Function in that UI Only formula field.

Read the docs about Case Function here.

https://docs.skuid.com/latest/en/skuid/formula-function.html#text-manipulation-and-analysisThe formula might look like this.

CASE(
  {{OwnerId}},
  "Id1", "Color1",
  "Id2", "Color2",
  "Color3")

The last value is the default value in case none of the user values are found.

The Color can be Hex, or an named html color value

WARNING: This solution will be fragile and will require you to edit the skuid page every time you have a new team member who needs a special color. I’d recommend adding a custom field to user object. (with a default value). This “User Color” field could be included in your skuid model for the calendar and would be used in that template.


Forum|alt.badge.img+7
  • Author
  • July 12, 2024

Worked perfectly, thanks Rob.

Separate but related note, is there a way to hide the times at the top of the calendar entries on Week view? I changed the Event template but it still shows the time regardless of the entry there.

CaptureTimes on Calendar.PNG


Forum|alt.badge.img+11
  • July 12, 2024

Hi Allison! I work a good bit on the calendar as PM, so this is good feedback - it looks like removing the times is not currently supported, but that could be an enhancement in a future release. I’ll make a note. If you’ve got a minute, could you give some of the reasoning as to why you’d like to remove the time labels?


Forum|alt.badge.img+7
  • Author
  • July 12, 2024

@mattb - Does DSS Calendar-Event-Font size control the font size for the calendar events (“boot camp” in my screenshot above)? I’ve adjusted the size here but it doesn’t seem to impact live calendar?


Forum|alt.badge.img+11
  • July 12, 2024

@Allison It should, but it looks like this is a bug. I’ve repro’d in an internal environment and will work with our engineering team to get it fixed. Thank you!