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 Apps
Answered

clearing filter

(0) ShareShare
ReportReport
Posted on by 24

Hi, I have below formula in my gallery item property.

 

Sort( If( IsBlank(DatePicker2), Filter( '【FSC】CCDiary', StartsWith( ID, TextInput2.Text ) || StartsWith( customer, TextInput2.Text ) || StartsWith( store, TextInput2.Text ) ), Filter( '【FSC】CCDiary', StartsWith( ID, TextInput2.Text ) || StartsWith( customer, TextInput2.Text ) || StartsWith( store, TextInput2.Text ), ThisRecord.Date >= DatePicker2.SelectedDate, ThisRecord.Date < DateAdd( DatePicker2.SelectedDate, 1 ) ) ), Date, SortOrder.Descending )

 

I have created two filter which is a date picker and text input box.

Screen OnVisible

UpdateContext({varReset:true});UpdateContext({varReset:false})

 

Date Picker 

Reset property varReset

Default empty

 

Text Input 

Reset property varReset

Default empty

 

I would like for the gallery to reset and show all items when I move back and forth from screen.

When I don't set any variables in text input reset property, it will show all items.

But If I set reset property to text input, it will return blank.

 

Grateful for any help you can give me.

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @sleoxilyne ,

     

    Please try this:

    Set the OnVisible of Screen to:

    Reset(TextInput2)

     

    Best regards,

    Rimmon Li

  • sleoxilyne Profile Picture
    24 on at

    Hi Rimmon,

    It didn't work, just returned as blank.

    Should I add If(IsBlank(Textinput2.Text) somewhere in my gallery item property?

     

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @sleoxilyne ,

     

    How are your variables used to reset controls? Have you tried to remove the original reset settings and test my method?

     

    "Should I add If(IsBlank(Textinput2.Text) somewhere in my gallery item property?"

    It's not necessary, I tested your formula, when the value of the control is empty, the gallery will return all items by default, in theory, you only need to reset the control to get all items in the gallery when the screen is switched.

     

    Best regards,

    Rimmon Li

  • sleoxilyne Profile Picture
    24 on at

    Hi Rimmon Li, sorry for the late reply.

     

    I can use your solution after I've set my textinput default to ""

    Thanks for the 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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard