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 / Error using datepicker...
Power Apps
Unanswered

Error using datepicker control which refers to invalid connector

(0) ShareShare
ReportReport
Posted on by 4

Hello,

 

I am using a gallery to display tasks and when I use the following, powerapps says there is an error

 

Filter('[dbo].[View_Tasks]', ProjID = drpProject.Selected.ProjID And StartDate >= dteFilterStartDate.SelectedDate )

 

The error is

 

An error occurred on the server. Server response: Not a valid connector. Error Response.

 

When I use Filter('[dbo].[View_Tasks]', ProjID = drpProject.Selected.ProjID ) as the items for the gallery it works.

However the datepicker control portion ( And StartDate >= dteFilterStartDate.SelectedDate ) causes the error.

 

In sql server, the data is a date field.

 

Any ideas why it should not like this statement?

 

Regards,

 

John

 

 

Categories:
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @JWF_2019 ,

    Do you mean that you can not filter data based on date type of SQL?

    Please note that:

    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.  

    //modify your date field data to value and compare this value

    Here's a doc about it for your reference:

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

    I've made a similar test for your reference:

    test5 is my date type field

    set the gallery's Items:

    Filter(
     AddColumns('[dbo].[testtime]',"newdate",
     Year(test5) * 10000 + Month(test5) * 100 + Day(test5)),
     newdate=Value(Text(DatePicker1.SelectedDate,"[$-en-US]yyyymmdd"))
     )

    Then the comparison will work.

     

     

    Best regards,

  • JWF_2019 Profile Picture
    4 on at

    I changed the formula as per your instructions and while there is no error, it did not return any records.  I even removed the projID criteria and still nothing.

     

    I then used AddColumns on a DataTable control to look at the data.  It shows the column but only some data at the beginning of the table (perhaps 500 records) which represents data for the year 2010.

     

    Now I see in the documentation there are "throttling limits" of 500.  So now I how do I filter properly and see records.   My objective was to create a filter form so that the user would select a project and a date range to see the tasks for that period of time.

     

    I thought this would be a really easy and straight forward application but it seems to me this is not simple.

     

    Is the sql date filter being looked into?  The current method cannot be efficient if your always converting the date format.

     

    Regards,

     

    John

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard