- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 09:57 AM
In continuation to my previous query,
need to write a onafter transform script to update a couple of Fields after the import / transform. But i do see one option is via Glide... but i would not have a specific way to search every record to update the same .. is there a better way to perform this operation as i need to update a couple of fields after every Row is completed
sample: i need to update the status and state fields based on the dates imported
Tried this but doesnt seem to work right
I need to check for conditions before updating, so i used a similiar script
on the customer project table
if (target.<datefield value> > sysDate )
{
target.phase == 'value to be updated'
}
am trying this way as there is no specific way to search for records using Glide
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 10:05 AM
Hi @Priya123 ,
Hope you are doing great.
To achieve this, you can use an "onafter" transform script in ServiceNow to update fields after the import/transform process. In your case, you want to update the 'status' and 'state' fields based on certain date conditions.
if (target.<datefield value> > gs.now()) {
target.status = 'new status value';
target.state = 'new state value';
}
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 10:05 AM
Hi @Priya123 ,
Hope you are doing great.
To achieve this, you can use an "onafter" transform script in ServiceNow to update fields after the import/transform process. In your case, you want to update the 'status' and 'state' fields based on certain date conditions.
if (target.<datefield value> > gs.now()) {
target.status = 'new status value';
target.state = 'new state value';
}
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 10:10 AM
This is what i tried and it did not Work ..