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 / Reference, in a text b...
Power Apps
Suggested Answer

Reference, in a text box, the first value in the first row of the first column of a collection?

(0) ShareShare
ReportReport
Posted on by 437 Super User 2024 Season 1
I have a collection (colMaxDate) that just has a single value.  The maximum (most recent) date from a sql table column.  After I submit new data to that table, I clearCollect to get the latest date.  So, how do I reference that single value (column name is just "Value") in a text box?
 
I tried to do this with just some code in the text field but after I submit data to the table, the text field doesn't update itself.  So this is my attempt at getting that field to update.  For reference, the field reads, "Last Seat Creation Date:  12/11/2024".
Categories:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    You can use the First() function to get the record and then access the field by name.
     
    first(colMaxDate).Value
     
    That will give you the full String. YOu'll probably then need to wrap that in a Last(Split()) of that value to get the actual date if that's all you want.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Suggested answer
    AndrianaO Profile Picture
    213 Moderator on at
    Hi, can you try to set Text property of your label as follows:
     
    "Last Seat Creation Date: " & LookUp(colMaxDate,!IsBlank(Value), Value)
     
    Let me know if this works! 
  • Brian-M Profile Picture
    437 Super User 2024 Season 1 on at
    Thank You, both solutions worked!

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard