cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drewski
Helper I
Helper I

Filter not working with SQL Dates pulled into PowerApps

Has anyone figured out correctly filtering from a date within SQL?

 

I've tried so many different variations trying to get the filter to work and I continue to get gallery display issues once it hits over the max threshold limit.

 

I attached a screenshot of the formula (this is just the latest of attempts to write it) The gallery then opens totally blank if there are over a certain number of items in SQL.

 

Any help would be greatly appreciated as this is preventing users from editing their items in the app.

 

Thanks!

Andrew

3 REPLIES 3
drewski
Helper I
Helper I

When the user clicks the item in the gallery, it should filter by the records in SQL  (by WORK_TRANSACTION_DATE) and load those items in the corresponding gallery.

 

How is your date in the SQL Table structured?

Does it conform to the suggestion in these documentation:

Direct date filters do not work for SQL Server. However, you can create a calculated column that will work. For instance, ALTER TABLE myTable ADD DateAsInt AS (YEAR([date]) * 10000 + MONTH([date]) * 100 + DAY([date])) and then filter on the calculated number column.

 

https://docs.microsoft.com/en-us/connectors/sql/

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Okay so I did what you suggested, now the date from SQL is coming into PowerApps in this format: 20190801

 

But the date in PowerApps is still in regular 08/01/2019 format. (Work_Transaction_Date)

 

I tried using the the Year(Work_Transaction_Date) Month / Day etc and that seems to format it okay in a label, but when I try the filter again, it's still not working at all.

 

Thoughts?

And thanks again for your help!

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,650)