Select to view content in your preferred language

How to handle duration or expiration time

260
5
06-25-2025 12:55 PM
SanchezNuñez
Frequent Contributor

Good afternoon,

We received a request from end users to add a duration or expiration time to polygon layers they digitize. The user wants each polygon to automatically be marked as expired a few hours after it is created.

The polygon represents alerts.

How do you add this information in a hosted feature class?  A date field?  

How to populate this information in a Web Map?

Thanks

 

 

 

0 Kudos
5 Replies
CodyPatterson
MVP Regular Contributor

Hey @SanchezNuñez 

I've personally set something like this up, and I made this happen very easily in the map specifically online.

What I would do is create a field for Alert Expiry, and enter a datetime field, once that's entered, create a filter on the map that only shows polygons that are not after the expiry date, using the filter tool on the right side of the web map.

Some condition like ExpirationDate >= Now or similar.

That would be my recommendation, but others may have more efficient or easier answers!

Cody

0 Kudos
SanchezNuñez
Frequent Contributor

Thank you @CodyPatterson 

These alerts only last for a few hours.  How will I enter an hour field in a Web Map? 

Thanks

0 Kudos
CodyPatterson
MVP Regular Contributor

Hey @SanchezNuñez 

The way to do this would be to either edit the feature layer that you're using and add a date field, or if there is already a date field available, you can use it to edit the expiry date like this here, entering a date and time along with status field if you would like:

CodyPatterson_0-1750942304470.png

 

Cody

0 Kudos
SanchezNuñez
Frequent Contributor

Thank you  @CodyPatterson 

 

I took a look to this Water Outages layer that has a date field called "Estimated Number of Customers Impacted", where an editor can enter a time.

Water Outage Area - Overview

Thanks

0 Kudos
CodyPatterson
MVP Regular Contributor

Hey @SanchezNuñez 

That's great to hear! If that field is unused by any other functions, you may use that along with the filter view to only show the active polygons, possibly setting it to only show non-expired polygons!

Cody

0 Kudos