filter data based on date and time field

256
3
Jump to solution
09-28-2020 05:35 AM
New Contributor II

If i want to edit date field  using smart widget i will see a drop list for time along with the calendar, but when i want to filter the data based on the same date field i can filter based on the date only, is there any way to filter the data based on the date and time ? can i show the same drop list for time  similar to the smart edit widget ? 

Reply
0 Kudos
1 Solution

Accepted Solutions
Esri Contributor

Hi Ahmad,

By taking a closer look at your screenshot, I just realize that this is an on-the-fly filtering function from the Attribute Table (runtime & custom filtering).

We do not support time-specific attributes filtering for custom filters (like in the Attribute Table or the Custom Filter inside a Filter widget) - see a Note in Filter widget—ArcGIS Web AppBuilder | Documentation 

If you want the time options to display for users, it can be achieved by the "ask for values" option inside a Filter widget (or Query depending on your needs) and configure it in the widget setting instead:

  • Configure inside the widget setting panel:

Configure a Filter widget

  • Filter by time:

Filter by time

  • Custom filter does not support time-specific filtering:

Custom filter does not support time-specific filtering

View solution in original post

3 Replies
Esri Contributor

In Web AppBuilder, the filter component honors the date/time settings from the data/map and there are two ways to customize them:

  • You can edit the time attribute prior to publishing the service
  • You can modify the date format in map viewer > configure pop-up > configure attributes > Format

Once the service supports time attributes, then it will show in the setting panels.

Best,

Tonghui

Reply
0 Kudos
New Contributor II

i already configure the pop-up to show the time , but still i can't filter the data based on the date and time.

Reply
0 Kudos
Esri Contributor

Hi Ahmad,

By taking a closer look at your screenshot, I just realize that this is an on-the-fly filtering function from the Attribute Table (runtime & custom filtering).

We do not support time-specific attributes filtering for custom filters (like in the Attribute Table or the Custom Filter inside a Filter widget) - see a Note in Filter widget—ArcGIS Web AppBuilder | Documentation 

If you want the time options to display for users, it can be achieved by the "ask for values" option inside a Filter widget (or Query depending on your needs) and configure it in the widget setting instead:

  • Configure inside the widget setting panel:

Configure a Filter widget

  • Filter by time:

Filter by time

  • Custom filter does not support time-specific filtering:

Custom filter does not support time-specific filtering

View solution in original post