Allen Andreas
Tera Patron

Hi,

If you're looking to go through and "fix" a lot of old records that meet this criteria, then I would recommend first building your filter as you need in list view (meaning go to the table in question, set the date/time, etc. within the filter), then right-click the breadcrumb filter and choose "copy query".

 

From there, create a fix script using GlideRecord and add the query you copied to an addEncodedQuery line and then set the records to the Active field selection as you need.

 

The benefit of doing this in a Fix script is that this can then be placed within an update set and brought forward to other ServiceNow instances as you need. Otherwise, if this is just for a specific instance, then you could utilize a background script instead (but getting into the habit of using a Fix script is always a good idea).

 

If this is for future created records, then you could accomplish this by a Flow in Flow Designer as well.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!