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

How to open a gallery when a search result is found/jump to result

Hi Guys,

 

Hope you are all doing well 🙂

I am working on an app for a school where they want to be able to receive "orders" from a webshop (SQL database with orders in between) and clear them for production. All works well so far, however, I have one topic where I could use your input.

 

I currently have three tabs, basically labeled "to be cleared/in production/done". In the background there is one gallery, which filters the result according to the tabs name and also additional search properties, like the name of the customer or their order number. The galleries Y-coordinate is set as a variable, so that it shifts position, based upon which tab is clicked. This all works as intended.

 

The question is regarding my search, located at the top. In this example I type in "1317" as I know that there is a order "A1317" in the tab "In Produktion" - and thats the issue: I needed to know in which tab the order is. What if it were in "Freizugebende Aufträge" or "Abgeschlossene Aufträge"?

 

Example video:

 

https://drive.google.com/file/d/19b3AVUL5praaHvVM0bmuBEK6z_CFj8O5/view?usp=sharing

 

So, it boils down to: Is there any way to jump to a search result within a gallery? Is there a function/way for that?

 

As always, many thanks for reading my dumb thoughts and your input - very much appreciated 😉

 

Nils

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Nils_PowerApps 

So there are a couple of ways to go about this.

I am not clear on your Title bars with the expand and collapse.  Typically I would do that with Datacards in a Canvas, but you might be doing it differently.

If I was doing it in datacards, I would typically have a Gallery in each datacard that is filtered based on the header/title.

AND, if I was doing that, I would then include in that header/title a label that indicates the number of items that would be in the gallery in that datacard.

So, for example, in the "In Produktion" header, I would have a label (or part of the same) that has a CountRows(galProduktion.AllItems)  this would give the user an immediate indication as to where the results are.

 

Now...since you indicate that you are using a single Gallery and shifting it around, then you would need to perhaps provide a label in the header/title that would filter based on the header/title.  

So, without knowing your Gallery items property or column names, I will assume that you have something like a "Status" column that would contain all the header/title values you have.  So, sticking with the "In Produktion" one, your label text property in the Header/Title would be : CountRows(Filter(yourShiftyGallery.AllItems, Status="In Producktion"))  This would then give the indication of how many items are in the gallery for that status.  Again then in the other Header/Titles, the same as above except with their status names to filter.

But, then there is the factor that you might also, beside shifting the Gallery around, already be filtering by the header/title value in the Items property.  IF so, then the above will not help for that.

So anyway...I'm just shooting out a few ideas here as some of them depend on your design and I am not familiar with it at the moment, so guessing a bit.

 

That should get you partly there.  You originally posted to automatically select something.  I am not sure if that really applies in your case as there could be results for each value, so what would you select?

 

Let me know if I'm in the ballpark and this gives you some clues.

_____________________________________________________________________________________
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

View solution in original post

6 REPLIES 6
RandyHayes
Super User III
Super User III

@Nils_PowerApps 

I am not entirely clear on what you are looking for.  If it is that you are working with one gallery and you want to select the item that matches the search, then you can utilize the Select function for this.  

However, the reality is, even though you have no visual indication as such in your gallery (at least that I saw in the video - nice music by the way!) the first row of the Gallery is always selected.

So...those are the bits that I got from the post and the video.  I am not sure if this is what you are seeking, so, if not, please elaborate a little more on what you are trying to achieve.

 

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
Nils_PowerApps
Frequent Visitor

Thank you @RandyHayes for your reply!

 

Its kind of hard to explain with words, so I just recorded a 50 second clip to better explain my problem - would it be ok if I send you the link to that clip in private, as the name of my employer is visible in that clip?

RandyHayes
Super User III
Super User III

@Nils_PowerApps 

Yes, that would be fine.  Shoot it to me in a PM.

_____________________________________________________________________________________
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
RandyHayes
Super User III
Super User III

@Nils_PowerApps 

So there are a couple of ways to go about this.

I am not clear on your Title bars with the expand and collapse.  Typically I would do that with Datacards in a Canvas, but you might be doing it differently.

If I was doing it in datacards, I would typically have a Gallery in each datacard that is filtered based on the header/title.

AND, if I was doing that, I would then include in that header/title a label that indicates the number of items that would be in the gallery in that datacard.

So, for example, in the "In Produktion" header, I would have a label (or part of the same) that has a CountRows(galProduktion.AllItems)  this would give the user an immediate indication as to where the results are.

 

Now...since you indicate that you are using a single Gallery and shifting it around, then you would need to perhaps provide a label in the header/title that would filter based on the header/title.  

So, without knowing your Gallery items property or column names, I will assume that you have something like a "Status" column that would contain all the header/title values you have.  So, sticking with the "In Produktion" one, your label text property in the Header/Title would be : CountRows(Filter(yourShiftyGallery.AllItems, Status="In Producktion"))  This would then give the indication of how many items are in the gallery for that status.  Again then in the other Header/Titles, the same as above except with their status names to filter.

But, then there is the factor that you might also, beside shifting the Gallery around, already be filtering by the header/title value in the Items property.  IF so, then the above will not help for that.

So anyway...I'm just shooting out a few ideas here as some of them depend on your design and I am not familiar with it at the moment, so guessing a bit.

 

That should get you partly there.  You originally posted to automatically select something.  I am not sure if that really applies in your case as there could be results for each value, so what would you select?

 

Let me know if I'm in the ballpark and this gives you some clues.

_____________________________________________________________________________________
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

View solution in original post

Nils_PowerApps
Frequent Visitor

@RandyHayesYou are the man! Thank you very much! CountRows - sometimes life can be that easy 😅

 

Based upon CountRows I came up with this solution:

 

https://drive.google.com/file/d/15t-u6fxzZbEb4peYT9lcQh-d4XZMdoCP/view?usp=sharing

 

I will have to work on the visuals, but as long as the function is there, the visuals are not as important to me.

 

Thank you very much 🙂

RandyHayes
Super User III
Super User III

@Nils_PowerApps 

Excellent!  Happy to help.  Yes, easy is best - Keep it Super Simple!!

_____________________________________________________________________________________
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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (59,281)