web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set Variables based on...
Power Apps
Unanswered

Set Variables based on collection that carries a single row

(0) ShareShare
ReportReport
Posted on by

I have a collection in my app that takes the row that has the Earliest Date in the "Date Out" Column of a sharepoint list and saves the entire row, the collection looks like how it is below:

 

Title:          Date In:        Date Out:

1                3/1/22          4/1/22

 

I just want to be able to set the "Title" and "Date Out" to their own variables, and print them out in a text box by referring to the collection, "EarliestDate" in my situation. To be clear the collection will always have only one item/row of information. I tried using Set(EarlyDate, First(EarliestDate.'Date Out')) and Set(TitleNum, First(EarliestDate.'Title')) but it seems to store these variables as empty records.

Categories:
I have the same question (0)
  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    hi @Anonymous 

    Try the following change:

    Set(EarlyDate, First(EarliestDate).'Date Out') and Set(TitleNum, First(EarliestDate).'Title')

    Set(EarlyDate,First(EarliestDate).'Date In');
    Set(TitleNum,First(EarliestDate).Title);

     

    Hope it Helps,

    R

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Try These

    Set(EarlyDate, First(EarliestDate).'Date Out')
    Set(TitleNum, First(EarliestDate).'Title')
  • TheRobRush Profile Picture
    11,128 Moderator on at

    @rubin_boer Sorry haha somehow missed your reply on this

  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    @TheRobRush we have impeccable timing 🙂

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard