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 / Gallery Not Clearing A...
Power Apps
Unanswered

Gallery Not Clearing After Patch

(0) ShareShare
ReportReport
Posted on by 31

Hello Power Apps Community!

 

We are about to launch the new time reporting app I've created (thanks to the help from everyone here), and I've noticed that after the user hit's the 'Submit Button' and returns to the 'Time Entry' screen that the values are still visible in the Gallery. This did not happen when I was testing, but I believe that's because I have admin rights?  

 

Here is the 'Items' function for the Gallery:

FirstN('LIST NAME',20)

 

Here is the code for the 'Submit Button':

Office365Outlook.SendEmailV2(
EmployeeEmail_3.Text, "Time Entry Submited - " &WeekEnding_4.Text, HtmlText1_1.HtmlText
)
;
ForAll(
Gallery1_3.AllItems,
If(
!IsBlank(ComboBox1.Selected.Result),
Patch(
'LIST NAME',
Defaults('LIST NAME'),
{
WeekEnding: DateValue(WeekEnding_4.Text),
HoursWorked: Value(TimeWorked_4.Text),
WeekNotes: Notes1_4.Text,
Client: ComboBox1.Selected.Result,
JobNumber: Dropdown2.SelectedText.Value,
Employee: EmployeeName_3.Text,
Rate: Dropdown1.SelectedText.Value
}
)
)
);
Navigate(Confirmation,
None)

Categories:
  • SolTeferi Profile Picture
    on at

    Hi @gengeset ,

     

    If what you are looking for is just change the visibility of the gallery after the data is patched, please do the following:
    On the Visible property of the gallery put the following:

     

    galVisible<>1

     

    Then at the very end of your formula on the submit button, put the following:

     

    Set(galVisible,1)

     

    Please note that if you refresh the page where the gallery is located, the gallery will be visible again. However, if you want to hide and show the gallery based on some other criteria like whether the user already submitted an item and it should not be visible anymore, that needs a little more than just changing visibility on submitting. I am also assuming "LIST NAME" is some list on SharePoint or somewhere. If it is a collection populated by user input, all you have to do is clear the collection after patching it to the datasource.

    Hope that may help.

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard