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 / Filtering/Patching Gal...
Power Apps
Answered

Filtering/Patching Gallery Issue

(0) ShareShare
ReportReport
Posted on by 1,151

Hi All

I am having a simple issue with my Gallery/Patch

When i Patch and click button!

 

I use a person lookup field 

ComboBox5

I then 1 textinput field based on the selected value

TextInput.Text5 = ComboBox3.Selected.Email

Then 2 more fields are connected to the Users connector

TextInput.Text6 =Office365Users.UserProfileV2(TextInput5.Text).mobilePhone

TextInput.Text7 =Office365Users.UserProfileV2(TextInput5.Text).jobTitle

 

which get patched but after patch the Textinputs are till populated with the last selected information even when i us navgate from a success screen with Navigate(Screen1_1,ScreenTransition.UnCover);Reset(search);Reset(Gallery1) on a button

i then do a new search and the fields are populated with the previous data

None of my textinput fields clear only the person lookup

 

Thanks

Gary

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,145 on at

    Hi @gazzo1967 

     

    Both ur text inputs are dependent on textinput5 which is dependent on the comboxbox (person picker)

    so just Reset(combobox)

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on โ€œAccept as Solutionโ€ to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • gazzo1967 Profile Picture
    1,151 on at

    @RezaDorrani 

    This does not work 😞

     

    I start with Screen 1 which is an infor screen with a button Formula 

    Navigate(Screen1_1,ScreenTransition.UnCover);Reset(search);Reset(Gallery1)

     

    the next screen

    is the filter textinput and on the gallery

    Filter(PR12a_Test_2,ID = Value(search.Text))

    I filter on the ID of the sharepoint list (which has some fileds populated by another powerapp)

    I search for a list item and it returns some information

     

    Then to the returned Gallery item i have added a combobox (person/group search)

    This then feeds a textinput with the searched users email address

    TextInput5 Default=ComboBox3.Selected.Email

    Based on this return I feed 2 other TextInputs

     

    TextInput4 Default = Office365Users.UserProfileV2(TextInput5.Text).mobilePhone

    TextIput Default=Office365Users.UserProfileV2(TextInput5.Text).jobTitle

     

    When i fill combox in and submit utiliseing the PAtch (which works fine)

     

    I navigate away to another screen with a button to retun to a 'blank' search but when i enter a search in the combodox is empty but the 3 textinputs have the previous data in them regardless of the searched ID

    I have used reset on the Gallery it doesnt work

    i have tried reset on the text inputs doesnt work either

     

    Sorry i hope that makes sense

    Thanks again for your help 🙂

    Gary

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @gazzo1967 

     

    This is because the gallery nested controls are not reset through Reset(Gallery). For them to work, you need to add the following expressions:
     
    Navigate(Screen1_1,ScreenTransition.UnCover);Reset(search);Reset(Gallery1);Set(ResetNested,true);Set(ResetNested,false)
    ResetNested is a variable which holds boolean value to reset the control.
     
    Now, add this variable to reset property of all the three controls as:
     
    TextInput5, TextInput4, TextInput -> Reset -> ResetNested
     
    This should reset the three controls.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • gazzo1967 Profile Picture
    1,151 on at

    @yashag2255 

    Thanks for reply

     

    I have done this and the controls are still not resetting 😞

    I added your formula to the 

    first screen which i have a but to navigate to the search (filter)

    Navigate(Screen1_1,ScreenTransition.UnCover);Reset(search);Reset(Gallery1);Set(ResetNested,true);Set(ResetNested,false)

     

    i added the textinput rest= ResetNested

     

    and added the 

    Navigate(Screen1_1,ScreenTransition.UnCover);Reset(search);Reset(Gallery1);Set(ResetNested,true);Set(ResetNested,false) to the 3rd screen navigated to after patch

    but the last submitted infor is still in the text inputs

    Which ever way i navigate the last combobox person details are still there

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @gazzo1967 

     

    Can you share a screenshot of the setup in the canvas app? Also, is the combobox getting reset? Reset means that the controls will now point to its default value.
     
    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • gazzo1967 Profile Picture
    1,151 on at

    @yashag2255 

    I have attached a word document as its easier

    Thanks Gary

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @gazzo1967 

     

    Thanks for such an explanatory description. You need to update few properties as:
     
    Combobox3:
    Reset: ResetNested
     
    TextInput5: 
    Default: If(CountRows(ComboBox3.SelectedItems) >0,ComboBox3.Selected.Email)
     
    TextInput4:
    Default: If(!IsBlank(TextInput5.Text),Office365Users.UserProfileV2(TextInput5.Text).mobilePhone,"")
     
    TextInput6:
    Default: If(!IsBlank(TextInput5.Text),Office365Users.UserProfileV2(TextInput5.Text).jobTitle,"")
     
    Hope this helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Verified answer
    gazzo1967 Profile Picture
    1,151 on at

    @yashag2255 

    Perfect 🙂

    Now i see the logic of the formula it makes sense 🙂

    Thank you for the help 🙂

  • gazzo1967 Profile Picture
    1,151 on at

    @yashag2255 

    Ok this worked as soon as i put the formula in place but when i patch and return to the 'blank search and open a new gallery they are populated again 😞 with the last entry

    Sorry if i am doing something wrong 😞

    Gary

  • gazzo1967 Profile Picture
    1,151 on at

    Also it only works on a PC not on mobile as it comes up with unknown error 😞

    I'm going totry a rebuild and see if that helps!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard