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

Select function pointing to wrong parent gallery

My app has 5 screens (Main, Edit Details, Search By Members, Search By Region, Item Details). 3 of the 5 screens (with respective galleries) are pointing to Item Details screen.

 

Issue: When selecting an item from 'Search By Members' screen, it is showing the data from Main screen. For example, if Main screen has 3 names (ABC, PQR, XYZ) and Search By Members also has same 3 names. When I click on PQR on 'Search By Members', it is showing ABC details in Item Details view.

 

How can I make the 'Search By Members' screen gallery to point to its own gallery. Please see attached for snapshots.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @shazufaraz ,

I cannot open your Word document, but from your description, it sounds like you have a galleries all with the same data source, but different Filters etc and one form to display whichever is selected. I will give you one approach that works (I do the same thing in a number of apps). Firstly I assume your data source is SharePoint (you did not specify this).

At the OnSelect of each of the three galleries put this

Set(vID,ThisItem.ID);
Navigate(YourScreenName)   //also whatever FormMode you are setting

Then the Item of your Form

Lookup(
   YourSPListName,     //replace with your name
   ID=vID
)

 This will select whichever record is selected from the relevant gallery.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @shazufaraz ,

I cannot open your Word document, but from your description, it sounds like you have a galleries all with the same data source, but different Filters etc and one form to display whichever is selected. I will give you one approach that works (I do the same thing in a number of apps). Firstly I assume your data source is SharePoint (you did not specify this).

At the OnSelect of each of the three galleries put this

Set(vID,ThisItem.ID);
Navigate(YourScreenName)   //also whatever FormMode you are setting

Then the Item of your Form

Lookup(
   YourSPListName,     //replace with your name
   ID=vID
)

 This will select whichever record is selected from the relevant gallery.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

The Item of the form was the key here. I am now pointing to respective galleries based on last access view. And yes, my data source is SharePoint.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (4,695)