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 / Display All Rows in a ...
Power Apps
Answered

Display All Rows in a Collection as Text or Table

(0) ShareShare
ReportReport
Posted on by 473

My Collection table stores 2 columns, Name and Value. 
*Date below is in mm/dd/yyyy format

gymcode_1-1706515875889.png


For all rows, I want to sort them by Date (ascending - earliest on top, latest at bottom), and display in a multi line text field, or a table if it is possible:

If Text:
1) 09 Feb 2024 - Event A
2) 10 Feb 2024 - Holiday B
3) 09 Aug 2024 - Holiday A
4) 04 Sep 2024 - Holiday C

If Table:

#DateReason
109 Feb 2024Event A
210 Feb 2024Holiday B
309 Aug 2024Holiday A
404 Sep 2024Holiday C

 

Any assistance would be greatly appreciated. Thank you.
___________________________________________________________________________________________________________________________________________

Below is my formula for the collection, if it helps.

 ClearCollect(
 ServiceCalendarDateAndName,
 AddColumns(
 Filter(
 varDateRange,
 Value in Filter(
 'Service Calendars',
 'Service Calendars (Views)'.'Active Service Calendars'
 ).Date
 ),
 "Name", LookUp('Service Calendars', Date = Value).Name
 )
 );
Categories:
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @gymcode 

     

    can you try this please:

     

     

    Sort(Collection, Value, Ascending)

     

     

    hen, you can use this sorted collection to display the data as needed.

    For a multi-line text field, you can concatenate the sorted dates with their respective names. Here's an example of how you can do this with a ForAll loop and the Concatenate function:

     

    Concatenate(
     ForAll(
     SortedCollection,
     Concatenate(Text(Index), ") ", Text(Value, "dd MMM yyyy"), " - ", Name, Char(10))
     )
    )

     

     

    For a table, you can use a Data Table control or a Gallery control to display the sorted information. You would set the Items property of the Data Table or Gallery to the sorted collection.

    To format the date within the table, you can use the Text function in the label control within the Gallery like so:

     

    Text(ThisItem.Value, "dd MMM yyyy")

     

     

    Please replace Collection with the actual name of your collection and SortedCollection with the name of your variable where you store the sorted table.

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • ruihaolrh Profile Picture
    473 on at

    Hi @mmbr1606 , thank you for the formulas.

    1. For the sort formula, I skipped this first as I'm not sure how to implement it.

    2. For the concatenation of the table rows into a text, I'm facing an issue where it says 'Expected Text Value'

    gymcode_0-1706518530658.png

    Below is my current formula on the concatenation:

    Concatenate(
     ForAll(
     ServiceCalendarDateAndNameBetweenSelectedDates,
     Concatenate(Text(Value, "dd MMM yyyy"), " - ", Text(Name), Char(10))
     )
    )

     

  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    can u try this modification:

     

    Concatenate(
     ForAll(
     Sort(ServiceCalendarDateAndName, Value, Ascending),
     Text(Index) & ") " & Text(Value, "dd MMM yyyy") & " - " & Name & Char(10)
     )
    )

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard