
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2016 07:05 AM
Hello,
I have a requirement to dynamically set the file path for scheduled import.
The issue here is that the file path contains the date and time on which it was uploaded to the site, like ninja_20160523123235.csv (format : yyyymmddhhmmss ). If the second is 35 today ,it can be 47 tommorrow .While the date,hour,minutes can be computed somehow, the seconds change according to the upload time.Can just the seconds be given as a wildcard when setting the value dor file path ? Possible ? Please let me know a way of scripting this or doing this any other way !!
Thanks.
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2016 07:47 AM
Hi Srinidhi,
I think I understand what you are doing. You've got a file on some remote system and you want ServiceNow to import it. Passing the date/time as a parameter is going to be tricky. I can see two options for you.
- Using Orchestration, get a file listing of the FTP site and take the highest numbered file to get the latest file.
- Update the source system to name the file "ninja_latest.csv" with a dated copy "ninja_20160523123235.csv" so you can always be sure you are getting the latest copy, but still have a dated archive copy in the event you need to run the import manually.
The first has a cost associated with it (Orchestration licensing), but adds a lot of power to you system. The second assumes you have access to the software or system placing files on the FTP server.
I hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 11:12 PM
Many Thanks Chuck Tomasi for the reply .. got the idea