filter data based on date and time field

1029
4
Jump to solution
09-28-2020 05:35 AM
ahmadhasan3
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 ? 

0 Kudos
1 Solution

Accepted Solutions
TonghuiMing
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

4 Replies
TonghuiMing
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

0 Kudos
ahmadhasan3
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.

0 Kudos
TonghuiMing
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

waynecoffey2
New Contributor

Hi  Tonghui, I have set my filter up as you have. At first if I just set up the date as ask for values I can save and use the filter but when a configure it to additionally filter the time variables the dialog will not let me save - it just freezes with no error warnings. I assume this due to something with the new filter variable and how I configured them. If I don't use ask for values I can save it.

0 Kudos