Is it possible to add filters to a saved search when using N/Task module to run saved search

582 views Asked by At

I have a script (2.0) successfully running saved searches and writing the results to CSV files in the File Cabinet via the N/task.searchTask.

The issue is that the full system requires multiple saved searches that vary only by date range, and multiple script deployments configured with the same script parameterized by Saved Search Id and File Id (for the results). It would be better/simpler to have one Saved Search and have parameters for the data range instead of having multiple Saved Searches.

Is there a path using the N/task.searchTask that allows for the adding of Filters on the Saved Search?

1

There are 1 answers

1
erictgrubaugh On

You can use the N/search module to load Saved Searches and modify them however you see fit before executing them. You could certainly load a Search then manipulate its filters property before running the search.