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 / Display the correct it...
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!

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @s44 

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

  • Hii_iii Profile Picture
    691 on at

    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,297 Super User 2024 Season 1 on at

    @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

    @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,297 Super User 2024 Season 1 on at

    @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

    Gallery2 is this : @RandyHayes 

    s44_0-1658418184579.png

    On the left there is no gallery :c

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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

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

    s44_0-1658420897596.png

     

  • Hii_iii Profile Picture
    691 on at

    @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

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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.

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