web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Booking Template Conditional Contents on the Schedule Board?

(0) ShareShare
ReportReport
Posted on by 8

Is it possible to have Conditional contents in the Schedule Board Booking Template?

I'm wanting to add a symbol if a Boolean field is true.

I've tried:

{#if (eq mybooleanfield true)}<b class="fa fa-star" style='color: #ffae42'></b>{/if}

and

<div style='width:{mybooleanfield}00%"><b class="fa fa-euro" style='color: #ffae42' ></b></div>

Based on 

The only other work around I can think of is to have a numerical field linked to the Boolean, but I'd rather avoid that if I can. 

I have the same question (0)
  • Verified answer
    Al Iggs Profile Picture
    on at

    I had several attempts and also discussed it with the product managers, but did not find a solution. Have therefore logged an idea: experience.dynamics.com/.../

  • Verified answer
    moko33 Profile Picture
    1,788 on at

    Hi Alex/Alexander, I'm wondering... to use styles in Booking Templates should be possible: "[... go to] Scheduling Parameters and set Disable Sanitizing HTML Templates to Yes. This is required to be able to include CSS statements into the booking templates. Next, add the following HTML and CSS ..."

    What in fact is missing I think is the ability to have it conditional (kind of if clauses). We also tried that without success.

    What I was thinking about once for working around was, to have calculated fields on your booking entity, that are sometimes empty or conditionally show certain values. And display these in your Booking Template.

  • AlexMcL Profile Picture
    8 on at

    Alexander and Manuel, thanks for your replies.

    The calculated field works very nicely - I had been thinking of using a flow or workflow.

    The Booking Template I used is:

    <div style='line-height: 11px !important; width: 99%; overflow: hidden; display: block; text-overflow: ellipsis;'>
    <b class="fa fa-star" style='{solution_scheduleboardstyle}"></b>
    WO<b>{msdyn_msdyn_workorder_bookableresourcebooking_WorkOrder.msdyn_name}</b><br/>
    <b>{msdyn_msdyn_workorder_bookableresourcebooking_WorkOrder.msdyn_account_msdyn_workorder_ServiceAccount.name}</b><br/>
    {msdyn_msdyn_workorder_bookableresourcebooking_WorkOrder.msdyn_workordertype}</div>

    Where solution_scheduleboardstyle is set to color: #ffae42; display: inline;  or  display: none; through the calculated field  

    Alexander's Idea posting would be an improvement to the product and would allow greater flexibility, without needing this sort of work around.

    ---

    Additional notes:

    • The above works with the Scheduling Parameter: Disable Sanitizing HTML Templates set to Yes
    • My understanding now is that my first attempts and attemps that included adding style definitions such as  <style> .yes {color: #ffae42; display: inline;} .no {display: none;} </style>  within the Booking Template failed because the Schedule Board processing strips out any contents of '{' ... '}', replacing the content with data from CDS fields, leaving blanks where it doesn't find a CDS field
  • Community Member Profile Picture
    on at

    {new_msdyn_workorderservicetask_bookableresourcebooking_new_msdyn_workorderservicetask.weconn_higheffort}

    i am using this line of code to my field value in Custome booking template. weconn_higheffort is field which gives result as yes or no.  Can you please help me how can i create if condition for this line of code

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 55 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans