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 / Reset date controls to...
Power Apps
Unanswered

Reset date controls to default. Special Case.

(0) ShareShare
ReportReport
Posted on by 49

Hi everyone,

I'm having a problem resetting my gallery to default. I use SQL Server as a database and had to add a dateInt column,
which converts the Date field from yyyy-mm-dd to yyyymmdd. This calculated column is the one I use to search my gallery.
When I start the app, all the records appear, and when I search by date range, the data is correct. Here's the code that performs the search:


Search(
Filter(
registro;
FechaInt >=(Year(DatePicker_busqueda_Inicio.SelectedDate) * 10000 + Month(DatePicker_busqueda_Inicio.SelectedDate) * 100 + Day(DatePicker_busqueda_Inicio.SelectedDate)

) &&
FechaInt <=(Year(DatePicker_busqueda_Fin.SelectedDate) * 10000 + Month(DatePicker_busqueda_Fin.SelectedDate) * 100 + Day(DatePicker_busqueda_Fin.SelectedDate)
)

);
busqueda_palabras.Text;
"Centro"; "Estado"; "Usuario"
)

If I do any search, it returns the results between both dates. The problem is when I want to reset the date controls and have all the records reappear.

If I do a normal reset like: Reset(DatePicker) the gallery doesn't show results. How can I fix this?
I would appreciate any help

Categories:
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @EvaSantos 

     

    can u please try this version:

     

    If(
     IsBlank(DatePicker_busqueda_Inicio.SelectedDate) || IsBlank(DatePicker_busqueda_Fin.SelectedDate),
     Search(
     registro,
     busqueda_palabras.Text,
     "Centro", "Estado", "Usuario"
     ),
     Search(
     Filter(
     registro,
     FechaInt >= (Year(DatePicker_busqueda_Inicio.SelectedDate) * 10000 + Month(DatePicker_busqueda_Inicio.SelectedDate) * 100 + Day(DatePicker_busqueda_Inicio.SelectedDate)) &&
     FechaInt <= (Year(DatePicker_busqueda_Fin.SelectedDate) * 10000 + Month(DatePicker_busqueda_Fin.SelectedDate) * 100 + Day(DatePicker_busqueda_Fin.SelectedDate))
     ),
     busqueda_palabras.Text,
     "Centro", "Estado", "Usuario"
     )
    )

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • EvaSantos Profile Picture
    49 on at

    Hello @mmbr1606 ,
    Thank you for your reply. My gallery still doesn't show results. I think the problem may be that for the DatePickers I have set a DefaultDate (?) and it does the search in a different date format(?) For the DePicker_busqueda_Inicio: DateValue("2023-01-01"; "en-ES") and for DatePicker_busqueda_Fin: Today()

    But when I start the App it does show all the results. It does the search well. It's just that it doesn't show all the results again. Refresh() doesn't work either.

    Captura.PNG

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard