cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Rapha222
Level: Powered On

Internal Server Error - Filtering by Date

Hi!

 

My app was working perfectly some weeks ago and without any changes isn't working now. I did some changes today in the filter in order to understand the error... and I discovered that if I use a Date field in the filter, the application doesn't show any information and the following message is showed: "An error occurred on the server. Server response: Internal Server Error" and the PowerApp doesn't generate the SQL (I'm using Data Gateway to connect in my SQL Server database and monitoring with SQL Profiler)

 

I simplify my filter for:

### PROBLEM FILTERING BY DATE ###

Filter('#Data Source#', date = DatePicker1.SelectedDate)

 

if I change the filter for the following filter (without filter by date), the SQL is generated and the data showed:

Filter('#Data Source#', TextSearchBox1.Text in description)

-- It shows that the DataBase and the Gateway are working well.

 

General informations about my environment:

- Database version Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)   Jun 28 2012 08:36:30   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

- Database date type: [datetime]

- Using Database Gateway;

- I tested on PowerApp Desktop Tool and on the web Tool, experiencing the same error.

 

Looks like a bug in the Power App Server but, Anyone has any suggestion?

3 REPLIES 3
Community Support Team
Community Support Team

Re: Internal Server Error - Filtering by Date

Hi @Rapha222,

 

I just tested the filter with SQL Server 2016 datatime column, and the filter works:

19.PNG20.PNG

Are there any related information under SQL profiler when the following error occurred?

"An error occurred on the server. Server response: Internal Server Error"

Besides, any configurations that you have made for the datepicker control?

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mokhawaja
Level 8

Re: Internal Server Error - Filtering by Date

Hi,

i am facing the same error when i try to filter a galler by a datepicker control... i am using CDS backend...and actually this error shows up on the runtime, but when i go to edit the error, it just refreeshes the formula, and the error is gone (in edit mode), then when i test again on mobile the same error comes at the beginning of the app launch, but the app is functioning normally and the data is filtered when i choose different dates.

 

it is just annoying to see this error, which i think is some kind of a bug in powerapps datepicker control.

 

regards,

Mohammad

pyee
Level: Powered On

Re: Internal Server Error - Filtering by Date

I'm still seeing this... the workaround I have is using:

Filter('[dbo].[vw_PowerApps_RunTickets]', Value(TicketDate) >= Value(DatePicker1.SelectedDate))

but it can't be processed remotely, so it's not an ideal solution. I'm on SQL Server 2012, and have verified that TicketDate is a Date value, not DateTime... has anyone come up with a better solution?

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,635)