Skip to main content
Nintex Community Menu Bar
Solved

Formula to conditionally color V2 calendar event source


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.

View original
Translate
Did this topic help you find an answer to your question?

5 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • 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.

Translate

Forum|alt.badge.img+7
  • Author
  • 86 replies
  • 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

Translate

Forum|alt.badge.img+11
  • 337 replies
  • 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?

Translate

Forum|alt.badge.img+7
  • Author
  • 86 replies
  • 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?

Translate

Forum|alt.badge.img+11
  • 337 replies
  • 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!

Translate

Reply


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