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

Get sharepoint list entries in a gallery, based on created date of another list

Hi all,

 

First the situation: 2 sharepoint lists (1 is a daily checklist, the 2nd is a list of multiple reports as a result (or addon if you will) on the checklist.

Im working on a canvas app where both lists are connected, collegea's fill in the daily checklist (list 1) and can add multiple reports (list 2).

Now i want a screen in the app with 1 Viewform and 1 gallery, where they can view the details of a checklist (selected from the maingallery) in the viewform and i would like it that on that same screen, in the gallery, they get an overview of the reports (2nd sharepoint list) where made on that same date. 

 

I am guessing i need to use the Lookup function, but am at a loss how to populate it.

 

To get from the main gallery to the details screen im using this Onselect command on the button:

Navigate(Details1,ScreenTransition.None,{info:'Linker overzicht'.Selected.ID}).

The info part is because i want them to be able to press only on the > button and not on the gallery itself (as it is with default gallery layout).

 

Screenshot 1: main gallery (from here, on the left they can select a checklist to view the details of)

KKok_0-1605888551523.png

 

Screenshot 2: The details screen, on the left they get the info from a selected checklist, on the right i would like to see the entries from List 2 which where created on the same date as the selected checklist.

KKok_1-1605888730439.png

 

 

2 REPLIES 2
Frequent Visitor

If I understand everything correctly, I think you need to filter list 2 where details screen created date is equal to List 2 created date. Maybe something like the code below.

 

Filter('List 2', DetailsScreenCreatedDate.Value=List 2 CreatedDate.Value)

Frequent Visitor

@jready Thank you for your help, unfortunatly it was not what i was looking for.

It gave me an idea though to use the Filter function and Created columns which contain the dates. I found the correct formula:

In the Onselect field of the navigation button in the Main gallery i created 2 variables which take the ID and the Created column from the selected sharepoint list entry (list 1).

Navigate('Details checklist',ScreenTransition.None,{info:'Linker overzicht'.Selected.ID, info2: 'Linker overzicht'.Selected.Created})

 

Then in the "view screen" i let the viewform take the selected list entry from the ID variable. Nothing fancy there:

LookUp(''List1',ID=info)

 

On the gallery (view screen, right side) i let it filter the entries from List 2 based on the Created column/variable of the selected entry of List 1, for which i had to convert it to Text and get rid of the timestamp.

Filter('List2', Text(Created,"[$-en-US]mm-dd-yyyy") = Text(info2,"[$-en-US]mm-dd-yyyy"))

 

So now they get the information of the selected checklist of List1 on the left and on the right they get a gallery overview of the entries placed on that same date in List2

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (82,175)