Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

how to set filter condition into export set

BanuMahalakshmi
Tera Contributor

Hi,

BanuMahalakshmi_0-1788421639294.png

I have created a database view for Incident and Problem list exports.

The database view contains the following fields, which can be used in the export definition conditions:

  • Opened, Incident Resolved At, Problem Resolved At

My requirement is to export 25 months of data into the Snow Incident and Problem CSV file. The export should include any ticket that was either created or resolved within the last 25 months.

I have configured the filter conditions using Incident Resolved At and Problem Resolved At, but the export is not returning the expected data. pls let me know correction. thanks.

1 ACCEPTED SOLUTION

IbrarA
Tera Guru

Hi @BanuMahalakshmi ,

Those two date rows are joined with AND, so a row only comes through if both dates fall inside the 25 months. In your view a row is either an incident or a problem, never both, so one of those two dates is always empty and the row drops out. That matches what you're seeing, where everything worked until you added them.

You can fix it by joining the two with OR instead. Your requirement also mentions created, and Opened isn't in the filter yet, so you can put all three in one group:

Opened, relative, after, 25 Months ago
or Incident Resolved At, relative, after, 25 Months ago
or Problem Resolved At, relative, after, 25 Months ago

Use Add "OR" Clause for the second and third rows so they stay in the same group, and you can leave your other conditions exactly as they are.

If you'd like to confirm it before running the export, you can open the database view as a list, apply the same filter there, and check the row count first.


thanks

ibrar

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron

@BanuMahalakshmi 

so you created database view by joining INC and PRB and then created export definition on that database view table

your image is not clear.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

i have attached database view, export set definition screenshot

@BanuMahalakshmi 

is that filter condition not working?

Is it working on incident table list?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

the export working  fine before i added filter condition incident.resolved 25 months, problem.resolved 25months.. after include these 2 condition no data exported.