web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Have a Gallery Contain...
Power Apps
Answered

Have a Gallery Contain Data Before Applying Search.

(0) ShareShare
ReportReport
Posted on by

Good morning,
I have an app that uses a Gallery and when an item in the gallery is selected the form populates with the data.
The issue I am having is that I want the gallery to reset after the Save Edit button is pressed.

I press the "Edit Existing BCL Manager Incentive" button
Form One:

ChrisL58_2-1714575033563.png

Form 2:

I type the name in the search box, which then reveals the records.

ChrisL58_3-1714575356901.png

The code I used in the Gallery Items property is.

Filter('BLC Manager Incentive_List',StartsWith(Manager,TxtSearchBox_1.Text)||StartsWith(Colleague,TxtSearchBox_1.Text))

When I click the "Edit Record" button the Display Mode changes from View to Edit allowing me to change a record, which also reveals the "Save Edit" button.
When I click the "Save Edit" button my confirmation popup form displays where I can either choose to make the edit or cancel the edit. Below is what I am using in the OnSelect property for the "Yes" option to submit the edit.

SubmitForm('BLC Mgr Incentive Form_Edit_1');Set(varShowEdit,false);Reset(TxtSearchBox_1);Notify("New BLC Manager Incentive was modified successfully!",NotificationType.Success,5000);ResetForm('BLC Mgr Incentive Form_Edit_1');
What happens next is I see an empty gallery and an empty form.
Form three:
ChrisL58_4-1714577316199.png

But if I start adding characters in the search box it starts a search and then populates the form.
What I would like to do is refresh the form after the edit showing records to start a new search just as I showed in Form Two.

Categories:
I have the same question (0)
  • Verified answer
    RogierE Profile Picture
    879 Moderator on at

    I guess you would want all records to be shown as long as there is no search text entered. You can do that by adding ||Isblank(TxtSearchBox_1.Text) to your filter like this

     

    Filter('BLC Manager Incentive_List',StartsWith(Manager,TxtSearchBox_1.Text)||StartsWith(Colleague,TxtSearchBox_1.Text)||Isblank(TxtSearchBox_1.Text))

     

    Please LIKE the reply and ACCEPT it as the solution if the answer is what you were looking for.
    (to help me grow in community rank and help others find the solution)

  • ChrisL58 Profile Picture
    on at

    Perfect!
    Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 385

#2
Vish WR Profile Picture

Vish WR 367

#3
timl Profile Picture

timl 340 Super User 2026 Season 1

Last 30 days Overall leaderboard