Format last run datetime in data source
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 12:45 AM
Hi Experts,
Is it possible to use pre/ post import scripts in a Scheduled Data Import record to update the last run date time field in the datasource with enclosed '' (ex: '2023-07-01 08:35:56'). If yes please provide a example script
Kindly provide your insights.
Thanks
1 REPLY 1

Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2024 01:55 AM
Hi @BALAJI K R ,
Multiple JavaScript objects are available in the Scheduled Data Import Pre script and Post script fields.
Object | Description | Example |
---|---|---|
cancel | Set this object to true to stop the import action. | Use the Pre script field to evaluate the conditions of the import and determine whether to cancel the import process. To cancel the import process, use the following call:
|
import_set | Get the GlideRecord object for the new import set. This variable allows you to query the following columns from the sys_import_set table:
|
If you want to use information from the import set, you can specify one of the properties of the import_set variable.
|
data_source | GlideRecord of the data source to be used for the scheduled import. | Typically, you define the data source with the Scheduled Data Import record. If you want to access this data source or modify the data source in certain conditions, you can use the following.
|