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

Notifications

Announcements

Community site session details

Community site session details

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

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
    875 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard