I have a button, 2 date fields:
And I am trying to update a datatable when the Buscar button is pressed, but is showing an error with 'Fecha Actual' which is a column in my SharePoint, but is showing the error below:
What would be wrong and how to fix it?
Thanks for the help.
I was able to fix it :
Filter(RangoFecha, 'Fecha Actual' >= FechaInicio.SelectedDate && 'Fecha Actual' <= FechaFinal.SelectedDate)
But now the DataTable is not refreshing now. how can I refresh it?
What is the Items property of your Datatable?
Well, your original formula really does nothing except to load 500 records into a collection.
I assume that is on the OnSelect action of the button.
In that formula you are using the Filter function, but all of the filtered table results go nowhere - you are not assigning them to anything and thus, they simply all go away.
You don't really need the button to perform the search. You can simply have your datatable respond to the date range.
In that scenario, the formula for the Items property of your datatable would be:
Filter(Datos_Generales_DockLogistic, 'Fecha Actual' >= FechaInicio.SelectedDate && 'Fecha Actual' <= FechaFinal.SelectedDate )
If you need more of a "click to do it" method with a button, then change your OnSelect action on the button to:
Set(glbRecords, Filter(RangoFecha, 'Fecha Actual' >= FechaInicio.SelectedDate && 'Fecha Actual' <= FechaFinal.SelectedDate) )
Then change your DataTable Items property to: glbRecords
Otherwise, what you have not for the Datatable is just the datasource...it will always be just that. In PowerApps you need to specify the table that you want to use for Items properties. Your other formulas will do nothing to impact that property.
I hope this is clear and helpful for you.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.