Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Display the correct item of a SharePoint list based on date

(0) ShareShare
ReportReport
Posted on by 691

Hello,
I'm creating a schedule on Power Apps that displays the time of different events from a SharePoint list.

 

My Power Apps schedule:

s44_0-1658414123715.png

 

My Sharepoint list:

s44_1-1658414140835.png

 


On the left of the screen, in front of each line of the planning, I would like to display all the factories (i.e "Usine" in my SP list) which are concerned by the event indicated on the planning. For example on the first line, we see that there is an event Lundi (i.e Monday in english) and Mardi (i.e Thuesday in english). So, we should display "d" and "e" in front of this line on the left.

 

I want the items of "Usine" here :

s44_0-1658416298240.png

 

However, I can't manage to do this. Could you help me please :(? Thanks in advance!

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Display the correct item of a SharePoint list based on date

    @s44 

    That is not an error message.  That is a normal message in the formula editor.  The Editor is not able to provide information on scoped data (anything with ThisItem).  This is completely normal and not an issue.

     

    As for the placement.  You are going to need to move your nested Gallery4 over to the right in order to provide a space for your label.  This was a given in that you want to have such a column in your gallery.

    So, move that gallery over to the right and the header label as well and then add the new label for the Usine value to be shown.

  • Hii_iii Profile Picture
    691 on at
    Re: Display the correct item of a SharePoint list based on date

    @RandyHayes 

     

     

    s44_2-1658421615840.png

     

    Ohh, I think there's been a misunderstanding. :0
    My gallery2 ends where is a red line. So there is no gallery on the left, where I want to display the Usine values

  • Hii_iii Profile Picture
    691 on at
    Re: Display the correct item of a SharePoint list based on date

    I have this error message when I change Gallery4 Items property 😞@RandyHayes 

    s44_0-1658420897596.png

     

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Display the correct item of a SharePoint list based on date

    @s44 

    So, gather your data at the outer gallery level instead of individually inside of it.

    Change your Gallery2 Items formula to the following:

    ForAll(
     Sequence(If(DateDiff(varVideoFirstDayView; DateAdd(varVideoMonth; 1; Months); Days)>35; 42; 35));
     With({_date: DateAdd(varVideoFirstDayView; Value; Days)};
     {Value: Value;
     Items: Filter(Fournisseur; DateArrivee <= _date && EndTime >= _date)
     }
    )

    Change your Gallery4 Items property to: ThisItem.Items

    Put a label in your Gallery 2 (to the left where you want it) and put the following formula:

    Concat(Distinct(ThisItem.Items; Usine); Result & ";")

     

    This should provide what you are looking for.

  • Hii_iii Profile Picture
    691 on at
    Re: Display the correct item of a SharePoint list based on date

    Gallery2 is this : @RandyHayes 

    s44_0-1658418184579.png

    On the left there is no gallery :c

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Display the correct item of a SharePoint list based on date

    @s44 

    All good except that you are nesting this gallery (Gallery4) in another Gallery (Gallery2).  It is in Gallery 2 that you are asking to have the values displayed.

    So, what is the Items property of Gallery2 ?

  • Hii_iii Profile Picture
    691 on at
    Re: Display the correct item of a SharePoint list based on date

    @RandyHayes Thank you for your quick response, I would like to display the value of Usine here:

    s44_0-1658416422751.png

    All to the left in front of the events 🙂 

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Display the correct item of a SharePoint list based on date

    @s44 

    Very good.  The Usine column would be available to you.

    Where exactly in your gallery do you want the Usine value to appear?  In front of each Date or Time or to the very far left of the entire row?

  • Hii_iii Profile Picture
    691 on at
    Re: Display the correct item of a SharePoint list based on date

    Is this : 

    @RandyHayes 

    Item of Gallery4 : Filter(Fournisseur; DateArrivee <= DateValue(Label4.Text) And EndTime >= DateValue(Label4.Text))

    s44_0-1658416004502.png

     

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Display the correct item of a SharePoint list based on date

    @s44 

    What is the Items property of your gallery?  The data for Usine should be provided to the gallery in that formula.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1