Calendar Strikethrough

  • 1
  • Question
  • Updated 3 years ago
  • Answered
How can I set the template on the calendar Event Template to display as strikethrough text, based on the value of another field in the model ( {{EventCleared}})?
Photo of Allison

Allison

  • 360 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Griffin Brown

Griffin Brown

  • 2,766 Points 2k badge 2x thumb
This is a cool use case
Photo of Griffin Brown

Griffin Brown

  • 2,766 Points 2k badge 2x thumb
Could you do it with 2 formulas, and set the calendar display to:

{{Formula_1__c}}[EVENT TEMPLATE{{Formula_2__c}}



Formula 1 - 
IF(
{{EventCleared}}=true,
"<strike>",
""
)

Formula 2 - 
IF(
{{EventCleared}}=true,
"</strike>",
""
)
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,240 Points 5k badge 2x thumb
Hi Allison~

To add to what Griffin suggested, are you trying to do something like below where the event on the 29th has cleared and the event on the 30th has not? 



If so, here is what I have in the event template: 
{{#Cleared__c}}<strike>{{Who.Name}} has {{Subject}}{{#Description}}: {{Description}}{{/Description}}</strike>{{/Cleared__c}}{{^Cleared__c}}{{Who.Name}} has {{Subject}}{{#Description}}: {{Description}}{{/Description}}{{/Cleared__c}}.

What the above template renders is based on two {{#...} ... {{/...}} combinations, one looking at if Cleared (a checkbox in my org) is true or false and the other looking at if Description is null or not.

Here is how the strikethrough part works:
  • If Cleared is true, it will strike through your text as dictated by this: {{#Cleared__c}}<strike>{{Who.Name}} has {{Subject}}{{#Description}}: {{Description}}{{/Description}}</strike>{{/Cleared__c}}.
  • If Cleared is false, it will simply show your text as dictated by this: {{^Cleared__c}}{{Who.Name}} has {{Subject}}{{#Description}}: {{Description}}{{/Description}}{{/Cleared__c}}
For more info, check out this tutorial: http://help.skuidify.com/m/11720/l/216661-skuid-template-syntax

Hope that helps you!!!
Karen
(Edited)
Photo of Allison

Allison

  • 360 Points 250 badge 2x thumb

Karen,


I changed my field to a checkbox {{EventComplete__c}} and tried below but still not working.  Am I doing something wrong?


{{#EventComplete__c}}<strike> {{WhoId}}: {{Subject}}, {{StartDateTime}} ({{OwnerId}})</strike>{{/EventComplete__c}}{{^EventComplete__c}}{{WhoId}}: {{Subject}}, {{StartDateTime}} ({{OwnerId}}){{/EventComplete__c}}



Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,240 Points 5k badge 2x thumb
Hi Allison~

Can you paste the xml for the page here? 

Thanks!
Karen