cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnthonyRegnier Helper III
Helper III

Navigate to Product detail with 2 galleries

Hey guys,

 

I have 2 BrowseGallery in different screens that are dispaying 2 different products based on a filter.

The first gallery shows all the products in my SP list (exclude if status=retired)

The other gallery shows all the products marked as retired (include only if status=retired).

I have then made a quick button that allow be to go back and forth to both galleries...

 

FYI, The "status" column's value change, and it become automatically "Retired" if I set the "threshold" column value to 0.

 

The problem is now when I go to the "Retired product" gallery, and I select one of the item in the list to have its details (productdetail screen), it does not take me to the actual product I clicked on, but to one of the product of the other gallery... the main ones that contains all the product that aren't "Retired"... 

 

How can I access the product detail, of the product I am selecting in my second Screen's BrowseGallery ?

Both Gallery have their OnSelect properties set to "Navigate(DetailsScreen, ScreenTransition.None)"

 

I have attached 2 screenshots

 

Thank you so much for your help guys

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz Community Champion
Community Champion

Re: Navigate to Product detail with 2 galleries

Hi @AnthonyRegnier ,

Just replace the gallery name I have used with your "Retired" gallery - this should work.

LookUp(
   [@'Stock Management'],
   ID = If(
      vRetired,
      Gallery_Retired.Selected.ID,
      Gallery_AllProducts.Selected.ID
   )
)

The long version

If(
   vRetired
   LookUp(
      [@'Stock Management'],
      ID = Gallery_Retired.Selected.ID
   ),
   LookUp(
      [@'Stock Management'],
      ID = Gallery_AllProducts.Selected.ID
   )
)

 

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

AnthonyRegnier Helper III
Helper III

Re: Navigate to Product detail with 2 galleries

Thank you so much @WarrenBelz  you're a champ!

View solution in original post

4 REPLIES 4
WarrenBelz Community Champion
Community Champion

Re: Navigate to Product detail with 2 galleries

Hi @AnthonyRegnier ,

Set a Variable on the OnSelect of each gallery 

Set(vRetired,true);
Navigate(DetailsScreen, ScreenTransition.None)

on the other one

Set(vRetired,false);
Navigate(DetailsScreen, ScreenTransition.None)

I will call the galleries BrowseGallery1 and BrowseGallery2 (change to your names).

So in the Item property of the form

If(
   vRetired,
   BrowseGallery2.Selected,
   BrowseGallery1.Selected
)

 

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.

AnthonyRegnier Helper III
Helper III

Re: Navigate to Product detail with 2 galleries

Hi @WarrenBelz ! 

 

Gosh I almost solved it myself I was on your tracks :p. 

Just one thing, on the item property of my form I have the below already:

LookUp([@'Stock Management'], ID = Gallery_AllProducts.Selected.ID)

 

I've tried few things to amend it with your code but without success so far. I'm still looking but if you get a min feel free to let me know :).

 

Thanks!
Anthony

 

WarrenBelz Community Champion
Community Champion

Re: Navigate to Product detail with 2 galleries

Hi @AnthonyRegnier ,

Just replace the gallery name I have used with your "Retired" gallery - this should work.

LookUp(
   [@'Stock Management'],
   ID = If(
      vRetired,
      Gallery_Retired.Selected.ID,
      Gallery_AllProducts.Selected.ID
   )
)

The long version

If(
   vRetired
   LookUp(
      [@'Stock Management'],
      ID = Gallery_Retired.Selected.ID
   ),
   LookUp(
      [@'Stock Management'],
      ID = Gallery_AllProducts.Selected.ID
   )
)

 

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

AnthonyRegnier Helper III
Helper III

Re: Navigate to Product detail with 2 galleries

Thank you so much @WarrenBelz  you're a champ!

View solution in original post

Helpful resources

Announcements
secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (8,265)