cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AdamH
Post Patron
Post Patron

Displaying a record after filtering with a toggle.

Hi All,

 

My first post - So Hello to you all! 👋

 

I'm building an employee manager powerapp and I have created a filtered gallery based on a toggle value in a SP list. 

 

I have this filter working well and it filters the correct records, but then I want to navigate to the record detail screen from the filtered list and I'm not sure how to do this. 

AETedit.png

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@AdamH 

Yes, I think that is much clearer.  

So based on that, I am wondering why you didn't just change BrowseGallery1 instead of adding in a whole new screen?

 

But, that aside, the only thing you need to do is get all of your Item properties working together.

You could just make sure that all the Item properties were set to Gallery1.Selected

 

If you stick with the variable we started to put together, then 

On your OnSelect of the arrow icon:

    Set(glbSelectedItem, ThisItem); Navigate(DetailScreen) 

On the FormDetails1 Item property:

    glbSelectedItem

On the FormEdit1 Item property:

    glbSelectedItem

And finally, on the OnSuccess action of FormEdit1:

   Set(glbSelecteItem, FormEdit1.LastSubmit)

 

Unless there is some other aspect that we are missing, that should link them all together properly.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

14 REPLIES 14
RandyHayes
Super User
Super User

@AdamH 

First, welcome!

 

Which part are you questioning, how to navigate or how to get that record in your form in your record detail screen?

 

If just navigate, then in the OnSelect of the right arrow icon, add the formula with a Navigate(yourDetailScreenName)

 

If you are trying to get the item clicked on to display in the form, then set the Item property of your form to yourGalleryThatisShow.Selected  

And still then the navigate formula above on the arrow as well.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

Hi Randy,

Thank you for your reply!

 

Sorry I don't think I made myself very clear in my first post. 

 

So the gallery I am displaying in the original screen shot is filtered based on a value in the SP list. With this new filtered list is showing in a new screen, I want to navigate to the original details screen by clicking the left arrow. 

 

I have tried Navigate(DetailScreen1) but this only displays the last record that was opened in DetailScreen1 and not the selected record. 

 

DS1.pngDS2.png

RandyHayes
Super User
Super User

@AdamH 

Yes, I understood you completely.

One item to change on the OnSelect of the right arrow icon:

    Select(Parent); Navigate(DetailScreen1)

 

Most likely, based on what I am assuming, your detail screen form is based on the Gallery selected item already and you're just not selecting the record in the gallery for that to work.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

Unfortunately that is still pulling in the last record opened in DetailScreen1.

Would it matter that I'm trying navigate and use the DetailScreen or DetailForm from another screen?

RandyHayes
Super User
Super User

@AdamH 

No, this all hinges on the Item property of the form...what is that set to?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

DetailScreen1 > DetailForm1 = BrowseGallery1.Selected

RandyHayes
Super User
Super User

@AdamH 

So if BrowseGallery1 is the gallery you are showing, and you've added the Select(Parent) as suggested, then you should be seeing the details for the line you have clicked on the arrow.

Have you made any other modifications to the app beside the filtering?

(BTW: I'm trying to stay on top of your responses - for some reason the forum here is not sending me notifications in a timely fashion - like 2 hours later - so, I'm checking yours manually)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
AdamH
Post Patron
Post Patron

@RandyHayes 

 

Sorry for the late reply here - and to answer your question I have not knowingly changed any of the app settings. 

 

Originally I created the app using a SP & Create PowerApps feature - So I thought I would just look at those navigation parameters and just modify them to be used in additional screens. 

 

The original browsegallery1 [Items] is set to: 

SortByColumns(Filter([@'NC MST Tracker'], StartsWith('Employee Name', TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)) 

and the right arrow (details screen) is set to:

Select(Parent)

 

My new gallery (called: Gallery1) screen that applies the filter is:

Filter([@'NC MST Tracker'], 'AET Instructor'=1)

and now the right arrow is set to:

Select(Parent); Navigate(DetailForm1)

 

I thought I would just be able to navigate back and use the detail screen or detail form that was already created to display the record, but I'm really not sure why this is not working.

RandyHayes
Super User
Super User

@AdamH 

So, I'm not sure then if there is something else in your app that is impacting the selection on the Gallery.  So, let's throw a variable snapshot at the problem.

 

In the OnSelect of your arrow icon, set the formula to : Set(glbSelectedItem, ThisItem); Navigate(DetailScreen) 

 

And on the EditForm on the DetailScreen, set the Item property to glbSelectedItem

 

Let's at least take out any mysteries with that.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,969)