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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Email Template Formatting issues

(1) ShareShare
ReportReport
Posted on by 37
Hello! 
 
I created a list of fields in which one of them is a choice (Yes/No), if it is a Yes, it will fill a field next to it with a predetermined value but if its no, it will be clear.
 
The issue is when i pulled the field on an Email Template, the fields that is empty will have a gap there.
 
I was wondering if there was a solution to this or is there another way to create this solution in a different way to not have the missing gaps?
 
Thanks
Categories:
I have the same question (0)
  • Suggested answer
    Tom_Gioielli Profile Picture
    2,762 Super User 2025 Season 2 on at
    If the issue is that the email template has essentially two spaces, you could try building one of the spaces into your predetermined value. In the rest of this answer, I will be using the dash (-) character to represent a blank space.
     
    For example, if we have the word "Super" in our custom field and then build out a sentence (no spacing before or after the word)
     
    When word is present: "This-pizza-tastes-super-good"
    When word is blank: "This-pizza-tastes--good"
     
    When the email template includes the space before and after your word, and the word is empty, the template is filling in two spaces. If instead, your custom field has "super-" with the space at the end of it you get the following:
     
    When word is present: "This-pizza-tastes-super-good"
    When word is blank: "This-pizza-tastes-good"
     
    In our second scenario, because we are storing the space after our word everything still works as expected even if it is not present. Important to note that this fix is very specific to your issue of the email template, and adding a space to the end of your word could cause other issues that I'm not aware of.
     
    If this helped, please consider marking the answer as verified.
  • JA-11021511-0 Profile Picture
    37 on at
     
    I have attached an example of the email template.
     
    Basically, the email template pulls the field from an Opportunity.
     
    There's a Business Process Rule that dictates to fill up the field with a predetermined text or clears it.
     
    What I wanted it to do is to not have that field show up in the email with the gaps where the fields are supposed to be.
  • Tom_Gioielli Profile Picture
    2,762 Super User 2025 Season 2 on at
    Got it, we are talking about a full carriage return rather than spacing between words.
     
    Unfortunately, I am not aware of any way to dynamically show or hide a row like you have below in the D365 email templates, short of inserting the carriage return into your string, Alternatively, you could create a new text area field for your email body and populate it using Power Automate which would give you much more flexibility. Then you can pull that whole text block into your email template.
     
    It's not a great solution, but I'm not aware of another way.
  • JA-11021511-0 Profile Picture
    37 on at
    Thank you for the answer!
     
    Is there a resource or a tutorial for the Power Automate method?
     
    What I am following is that:
     
    -> Have a section in the Email Template to be filled by Power Automate
     
    -> Power Automate fills the missing fields 
     
    -> Email Template pulls from PA?
     
    Is that right?

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans