- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 08:24 AM
How can I print or display the values that I push to the variable name "records"? Your education on how to will be appreciated, Luis
SCRIPT BELOW:
var records;
var rec_id = [];
var grApprovalQueue = new GlideRecord('incident');
grApprovalQueue.addEncodedQuery('priority=2^category=inquiry');
grApprovalQueue.query();
while (grApprovalQueue.next()) {
rec_id.push('Record Id: '+grApprovalQueue.incident);
}
records = rec_id.join();
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 09:06 AM
Use gs.info(records); in flow designer.
Then you can check the logs in syslogs table.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 08:34 AM
Try below:
var records;
var grApprovalQueue = new GlideRecord('incident');
grApprovalQueue.addEncodedQuery('priority=2^category=inquiry');
grApprovalQueue.query();
while (grApprovalQueue.next()) {
record=grApprovalQueue.number+","+record;
}
gs.print(record);
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 08:59 AM
RaghavSh, if I use the script below in a Script Action in Flow designer the record is blank. Does not contain any data. Therefore, I thought that to print it in Flow Designer I need to use an object array. However, I am learning so is there any changes that I need to make to what you suggested in order to make it work in the Flow Designer Script step? Appreciated the education and collaboration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 09:06 AM
Use gs.info(records); in flow designer.
Then you can check the logs in syslogs table.
Raghav
MVP 2023