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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Condition is not working in Each Loop in REAL Time Marketing

(0) ShareShare
ReportReport
Posted on by 216

Hello,

I'm trying to add condition in for each block in marketing emails but it's showing error. I wanted to show the orders related to contact where "Add to email" check on orders is "Yes".

   <td>{{#each marketingOrder}}
                            {{#if marketingOrder.$vw_addtoemai }}
                        <p style="color:;font-size: 14px; font-weight: normal;font-family: 'Open Sans', Arial, sans-serif;"><font face="'Open Sans', Arial, sans-serif">Order Placed:</font>&nbsp;</p>

                        <p style="color:;font-size: 14px; font-weight: normal;font-family: 'Open Sans', Arial, sans-serif; margin:1px 0 0;"><font face="'Open Sans', Arial, sans-serif">Order Number:</font> <font face="'Open Sans', Arial, sans-serif">{{marketingOrder.$vw_name}}</font></p>
                        {{/if}}
                        {{/each}}</td>
 
I'm using this code and on validation getting the below error
8765.Untitled.png
How to add condition in foreach loop in realtime markting ... please help
Best Regards,
Fariha Asmat
I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Fariha Asmat,

    I have tested multiple ways such as: 

    {{#each MarketingOrders}}

      {{#if this.cr287_addtoemail}}
      {{/if}}
    {{/each}}

    or 

    {{#each MarketingOrders}}

      {{#if MarketingOrders.cr287_addtoemail}}
      {{/if}}
    {{/each}}

    However, neither of them could work. It seems that condition could not work in list by now. You would better raise a ticket.

  • Fariha Asmat Profile Picture
    216 on at

    Hi Steve Zhao,

    Thanks for testing. Yes it's not working the both way I'll raise a ticket with MS on this.

    Thanks,

    Fariha

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 168 Super User 2026 Season 1

#2
NeerajPawar Profile Picture

NeerajPawar 65

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 51 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans