- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 07:25 PM
Hi Community,
I'm facing an issue with the string type field which is removing the leading zeroes of a number when exporting report to mid server in csv file format.
Example, the employee number 00123, after export the report to mid server using export set, the number updated as "123".
Appreciate if someone could provide a script in export set pre-export script to add apostrophe in front of the number so that the leading zeros remain.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 08:18 AM
Try changing the table to a database view and running it.
var gr = new GlideRecord(tableName);
↓
var gr = new GlideRecord(viewName);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 09:01 PM
Hi Hiroshi,
I've tried using your script in Scheduled Exports > Execute pre-export script. Unluckily the apostrophe still not appended in the employee_number field once the report generated to mid server. Is there any other script that would make this works ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 08:18 AM
Try changing the table to a database view and running it.
var gr = new GlideRecord(tableName);
↓
var gr = new GlideRecord(viewName);