Skip to main content

Notifications

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

How to export all registrations with session attendance and answers

Posted on by 895

We have implemented event management and our customer has a straight forward question: how to export all the event registrations with the sessions they attend and the answers they provided to custom questions.

Of course we are able to export all the individual data with exports etc. and combine the exports. However, that's not easy to handle for the users. Is there any other way to achieve such a requirement?

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: How to export all registrations with session attendance and answers

    Hi Marc,

    We could build fetchXml query and visualize it into a SSRS report to achieve your requirement.

    e.g:

    There is an event, we called it Event X, the event has two sessions: Session A, Session B, and three custom registration fields: question 1, question 2 and question 3.

    Clofly Mao registered for session A and gave his reponse to questions.

    Viktor Mao registered for both session A and session B and gave his reponse to questions.

    To make all of them in one table, the dataset would be below:

    Contact Event Session Question Answer
    Clofly Mao Event X Session A Question 1 Lorem
    Clofly Mao Event X Session A Question 2 ipsum
    Clofly Mao Event X Session A Question 3 dolor
    Viktor Mao Event X Session A Question 1 sit
    Viktor Mao Event X Session A Question 2 amet
    Viktor Mao Event X Session A Question 3 consectetur
    Viktor Mao Event X Session B Question 1 adipiscing
    Viktor Mao Event X Session B Question 2 elit
    Viktor Mao Event X Session B Question 3 sed

    A response is associated with one event registration record, 

    but an event registration record will be associated with many session records,

    so Viktors' result will be expanded and thus be duplicated.

    Below is my test result in console:

    pastedimage1590569696535v1.png

    Please follow tutorials below to build a report that shows contact name, event name, associated session name, question and answer in same table:

    1. Install necessary tools and packages:

    https://readyxrm.blog/2018/07/24/set-up-your-workstation-to-create-sql-server-reporting-services-reports-for-dynamics-365-revisited/

    2: Guidance for how to use SSRS tools:

    https://readyxrm.blog/2018/07/24/how-to-create-your-first-dynamics-365-ssrs-report/

    fetchXml:

        
            
            
            
            
                
            
            
                
                
            
        
    

    javascript code to test fetchXml:

    var fetchxml = ''
          ''
          ''
          ''
          ''
          ''
              ''
          ''
          ''
              ''
              ''
          ''
          ''
          '';
    
    var query = "?fetchXml="   encodeURIComponent(fetchxml);
    
    Xrm.WebApi.retrieveMultipleRecords("msevtmgt_eventregistration", query).then(
        function success(result) {
            console.log('ok');
            for (var i = 0; i < result.entities.length; i  ) {
                console.log(result.entities[i]["ContactId@OData.Community.Display.V1.FormattedValue"]   " "
                  result.entities[i]["EventId@OData.Community.Display.V1.FormattedValue"]   " "
                  result.entities[i]["Session.msevtmgt_sessionid@OData.Community.Display.V1.FormattedValue"]   " "
                  result.entities[i]["RegistrationResponse.msevtmgt_customregistrationfield@OData.Community.Display.V1.FormattedValue"]   " "
                  result.entities[i]["RegistrationResponse.msevtmgt_response"]);
            }
        },
        function (error) {
            console.log(error.message);
        }
    );
     

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans