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 / Get first and last ite...
Power Apps
Answered

Get first and last item on gallery

(0) ShareShare
ReportReport
Posted on by 103

I have a repeat table using with gallery. I want to get first start date and last End Date to show data on form.

This is Gallery

LuanDT_0-1696327641452.png

And i want to get data from date picker to StartDate DataCard and EndDate DataCard on Form 1 for saving data on sharepoint list

LuanDT_1-1696327739000.png

 

 

 

Categories:
  • Verified answer
    Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    To get the earlies date displayed in the gallery, you can use:

    First(Sort(galEvents.AllItems,StartDate)).StartDate

     

    This sorts the gallery items by start date, and then gets the first item. You can do something similar for end date:

    Last(Sort(galEvents.AllItems,EndDate)).EndDate

     

    I'm not sure what you're asking about getting the date value into a card, but you can select the card, unlock it, and set the default value to be the selected value in the date picker.

  • LuanDT Profile Picture
    103 on at

    @Mike2500 Thank you as well

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard