cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nlsh
Frequent Visitor

Set Variables based on collection that carries a single row

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TheRobRush
Super User
Super User

Try These

Set(EarlyDate, First(EarliestDate).'Date Out')
Set(TitleNum, First(EarliestDate).'Title')
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

4 REPLIES 4
rubin_boer
Super User
Super User

hi @Nlsh 

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

TheRobRush
Super User
Super User

Try These

Set(EarlyDate, First(EarliestDate).'Date Out')
Set(TitleNum, First(EarliestDate).'Title')
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
TheRobRush
Super User
Super User

@rubin_boer Sorry haha somehow missed your reply on this

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
rubin_boer
Super User
Super User

@TheRobRush we have impeccable timing 🙂

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,704)