Hi,
It seems an easy filter but could not get it. I want the user only enter 1 date to filter records and see what restriction there are on a chosen location.
I have a hosted feature layer and each record has the attributes [restrictions], [activity], [date_from] and [date_till] ] that I want use to filter. [date_from] and [date_till] is a given period that defines the restrictions for that record.
I created this filter:
2. Choose activity
3. Choose date activity
2. defined the activities as predefined and an extra value as default to start with an empty map for this layer
3. asking for a date. Now need to ask the date of the activity twice to filter the records in the layer.
Any ideas?
Solved! Go to Solution.
I have changed my approach, even I am still curious if there is a solution (or only a customized widget could do the trick)
Because the date of the activity is in a certain period, I created 3 filters and ask the user to say in which period the activity will take place and filter the records based on 2. and 3.
@Stefan_Thorn Based on your description, There are two fields - [date_from] and [date_till], representing different meanings of dates, which is also indicated by the last screenshot.
Trying to understand your case - do you mean you want to use one date value but for two different fields?
I want the user only enter 1 date to filter records and see what restriction there are on a chosen location
I want to ask the user a date and use that as input to select certain record(s) . I only want the record(s) were the given date is in date_from <= given date <= date_till
below screenshot of 3 of 573 records in the table. i.e. I want to select the record (objectid 92) where the activity is 'Consumenten siervuur...' on April 16.
outcome in the viewer (not the records from the table above)
I see. Thanks for the screenshots. For this scenario, I think the group filter cannot deliver either, since there are two separate operators (one is on or before, the other is on or after). A custom widget might be a better solution.
In Experience Builder, every field gets its own filter action. As far as I know, there's nothing like the "Group Filter" widget like there was with Web App Builder, so you can't have a single input act against multiple fields.
Is it possible to make the layer time-aware and just use a time slider widget instead?
The group filter feature has been provided in the latest AGOL Feb release. See details in this post or the official documentation.
I have changed my approach, even I am still curious if there is a solution (or only a customized widget could do the trick)
Because the date of the activity is in a certain period, I created 3 filters and ask the user to say in which period the activity will take place and filter the records based on 2. and 3.