cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

How to display only search results within a gallery

Dear all, 

 

I`ve just started to try Building my really first power app 🙂 Actually it seems to be so simple but I´m getting really desperate About the following: 

 

My User Story: 

The User opens the App and simply find one search box. He´s able to enter text and get either a result or the message "This entry doesn`t exist". If the user clears the search box he sees a blank Display again. It´s possible that the end user never see all entries of the Gallery/list behind.

 

Details:

I`ve got a Gallery depending on a SharePoint List with simply three columns (Name, Name2, Birthdate). I have inserted a TextBox, search Icon and the Gallery on Screen1. I set up a search-Function on the Gallery, connected to the entries in the textfield. Everything works fine so far. My Problems: 

- After the user delets the entry in the textfield, the Gallery turns back to Show all items. But the user should never see all items!

- How do I insert a text message showing "No entry" when no match is found.

 

Looking Forward to your support! Many thanks!!!! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @tobiasjmichl :

Could you tell me:

Do the folleowing scenarios meet your needs——

  • When the search bar is empty or the specified record cannot be found "This entry doesn`t exist"
  • Otherwise, display the records found through the gallery.

I suggest you can display "This entry doesn`t exist" by adding a label control. Then control the conditions under which they appear by setting the visible attributes of the gallery and label.For example:

1\Add a label control and set it's Text property to:

 

"This entry doesn`t exist"

 

set it's visible property to:

 

IsBlank(SearchBox.Text)||IsBlank(LookUp(YourDataSource,Column1=SearchBox.Tex))

 

2\Set the Gallery's visible property to

 

!(IsBlank(SearchBox.Text)||IsBlank(LookUp(YourDataSource,Column1=SearchBox.Tex)))

 

Best Regards,

Bof

 

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @tobiasjmichl :

Could you tell me:

Do the folleowing scenarios meet your needs——

  • When the search bar is empty or the specified record cannot be found "This entry doesn`t exist"
  • Otherwise, display the records found through the gallery.

I suggest you can display "This entry doesn`t exist" by adding a label control. Then control the conditions under which they appear by setting the visible attributes of the gallery and label.For example:

1\Add a label control and set it's Text property to:

 

"This entry doesn`t exist"

 

set it's visible property to:

 

IsBlank(SearchBox.Text)||IsBlank(LookUp(YourDataSource,Column1=SearchBox.Tex))

 

2\Set the Gallery's visible property to

 

!(IsBlank(SearchBox.Text)||IsBlank(LookUp(YourDataSource,Column1=SearchBox.Tex)))

 

Best Regards,

Bof

 

View solution in original post

Hi Bof,

 

thanks for your answer and sorry for my late Reply!

I had to Forward this internal request to my colleagues in our IT Department and shared the link to this post to them 🙂 Maybe they can fnish this Project. But your tips seem to be very helpful. I´ll ask them to give you detailed Feedback when finished the Task.

 

Thanks and Kind regards

Tobias

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.

Top Solution Authors
Top Kudoed Authors
Users online (46,647)