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

Announcements

News and Announcements icon
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
    Microsoft Employee 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 51 Super User 2026 Season 1

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#3
Nagaraju_Matta Profile Picture

Nagaraju_Matta 50

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans