Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Sort with respect to date in Marketing email

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I need to sort the registrations data wrt date in marketing email. Below is the code that i am using now.

{{ #each contact.msevtmgt_sessionregistration_contact_msevtmgt_contactid }}
{{#if (eq this.msevtmgt_event '00000000-000-00-00-0')}}
{{/if}}
{{/each}}
How can i sort his dates according to time.Also what is the current criteria used to filter the 'for each loops' record fetched by dynamic content in marketing mail.Can we use any variable to store data in dynamic content ?
Thanks in advance. 
  • Suggested answer
    ShravanSuri Profile Picture
    ShravanSuri 1,255 on at
    RE: Sort with respect to date in Marketing email

    Hey Commun,

    This is a functionality that we don't currently support - we've added it to our backlog for consideration.

    Thanks,

    Shravan

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Sort with respect to date in Marketing email

    Hi Commun,

    I created 3 event registration records for same contact and tested several times in preview mode.

    pastedimage1586325054184v1.png

    It seems that sorting is random(no criteria) in each time.

    pastedimage1586325152991v2.png

    pastedimage1586325197631v3.png

    Dynamic expression in marketing email is based on a javascript template library: Handlebarsjs.

    In pure HTML page, we could do sorting on output of 'for-each loop' by creating our own sorting function(a feature in the library),

    however, js will be blocked in HTML email by most email service providers due to security reason;

    Thus we couldn't use any variable to store data in dynamic content, or do sorting on output,

    in other word, there are limited expression options(may only examples in documentation) for us to add dynamic content in email content.

    Please suggest your requirement in Ideas forum to make it could be available in future version.

    Regards,

    Clofly

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans