Export definition filter condition

Raksha125
Tera Guru
Tera Guru

I have a requirement to create two export definitions in ServiceNow:

  1. The first export definition is required to export records created between the 1st and 15th of the month, which will run on 16th of that month.
  2. The second export definition is needed to export records created after the 15th of the month which will run on 1st of next month.

I need to create filter conditions for these requirements but I am not able to get what I exactly want. Need some help here.

4 REPLIES 4

Community Alums
Not applicable

Hi @Raksha125 ,

Create an export definition to define what data to export in an export set.

Before you begin

Role required: export_set_admin

About this task

An export definition specifies the data to be exported in an export set. This data includes a table, one or more fields, and optionally a filter to limit the included records.

Procedure

  1. Navigate to All > System Export Sets > Export Definition.
  2. Click New.
  3. Enter a descriptive Name for the export definition.
  4. Select the Table to export data from.
  5. Select one or more Fields from the selected table to export data from.
  6. (Optional) Specify a Filter to export only certain records from the selected table.
    Specifying a filter condition on the Created (sys_created_on) or Updated (sys_updated_on) fields may prevent scheduled data exports from using delta exports functionality. Do not specify filter conditions on these fields if you intend to use scheduled delta exports.

Also, refer to my answer : https://www.servicenow.com/community/csm-forum/export-definition-with-a-related-list-condition/m-p/2...

 

 

@Community Alums  I have already created 2 export set definitions but I wanted help with creation of the filter conditions to get the exact results that I was looking for.

shloke04
Kilo Patron

Hi @Raksha125 ,

Please follow the steps below to achieve the same:

1. Navigate to the module "Export Definition" and create an entry against the table for which you would like to export data from. Also define which attribute you would like to export from the selected table as shown below:

shloke04_0-1710750080688.png

 

2. Now, navigate to an module named "Export Target" and create an entry as shown below:

shloke04_1-1710750198440.png

 

 

3. Now, navigate to an module named "Export Set" and create an entry as shown below:

shloke04_2-1710750215070.png

 

4. Now finally create a scheduled Export entry using the module "Scheduled Export Set" where you can specify the condition to make this run on 16th of every month and fetch only records created between 1st and 15th of that month as shown below:

shloke04_3-1710750875669.png

 

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

@shloke04  The one for first 15 days is ok but when we try to run it for remaining days of the month, there it creates problem. Even if we use "relative before 15 days ago" filter option, it doesn't work for months having 31, 28 and 29(leap year) days