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 :
Power Platform Community / Forums / Power Apps / How to Sort Repeating ...
Power Apps
Unanswered

How to Sort Repeating Content in Word Templates Using XML Mapping for Model Driven App?

(2) ShareShare
ReportReport
Posted on by 95

Hey everyone,

I've set up a Word template using XML mapping to generate documents from PowerApps Model-Driven Apps (MDA). One section of the document contains a checklist table that pulls step details (step order and step name) as a repeating content control.

Added Repeating Section into this table in Word Template

The template successfully outputs all the checklist steps, but…

The Issue:

The steps do not appear in the correct order. Instead of following the step number sequence (e.g., 1, 2, 3, etc.), the generated table displays them in a seemingly random order.

Wrong Ordered Output

Questions :

  1. How is the sequence being determined?
    • Is Word pulling the data based on the order of retrieval from Dataverse, or is there an internal sorting logic being applied?
  2. Can I enforce sorting within the Word template itself?
    • For the Word's XML mapping of the dataverse table, can we direct filtering or sorting options, to ensure the table outputs in ascending step number order?
    • If sorting has to be done before the data reaches the template, what’s the best way to enforce it in PowerApps Dataverse MDA?

I've already tried setting a sort order on the checklist steps inside the MDA view, and it works correctly within the MDA app. However, have been unable to replicate this onto the Word template.

Any insights, workarounds, or alternative approaches would be greatly appreciated! Thanks in advance.

I have the same question (1)
  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    Can you share the xml mapping?
     
     
  • Rajath_mk Profile Picture
    95 on at

    Hi Michael,

    I wasn’t entirely sure what you meant, so I’ve attached a screenshot of the XML mapping section. The highlighted section is where I’m experiencing the sorting issue.

    Please let me know if this is what you were asking for or if you need any additional details. Thanks again for your help!

     

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard