- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Upfront my grasp of Glide and coding in general is rudimentary and working on being more proficient but it's a challenge. What I am trying to do is display specific variables based on the Approver's ID. This mail script is called by a notification that is specific to this one catalogue item. What seems to be happening is the validation piece isn't working though I have no errors. Below is the script I have (cobbled together using a couple other community posts I have seen). Variable 1 and Variable 2 were the two paths I was going down without much success but hopefully someone can guide me and it is just a small change.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
If the notification calling this mail script is running on the sysapproval_approver table, then 'current' will refer to the approval record. Technically, your 'while(getvariables... should be if(... since only one record will be returned, but in this case 'while' will also work. Your if statement would look more like this to access the 'variables' object on the retrieved sc_req_item record:
if (getvariables.variables.uar_approver_1 == sysapprover) {
template.print('Access Details:' + getvariables.variables.uar_reason_1);
}
There are still a bunch of reasons this could not be working - incorrect variable names or types,... so try adding some gs.info messages to log the progress.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
If the notification calling this mail script is running on the sysapproval_approver table, then 'current' will refer to the approval record. Technically, your 'while(getvariables... should be if(... since only one record will be returned, but in this case 'while' will also work. Your if statement would look more like this to access the 'variables' object on the retrieved sc_req_item record:
if (getvariables.variables.uar_approver_1 == sysapprover) {
template.print('Access Details:' + getvariables.variables.uar_reason_1);
}
There are still a bunch of reasons this could not be working - incorrect variable names or types,... so try adding some gs.info messages to log the progress.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hey Brad,
Thanks for the info it is slowly soaking in. It looks like my problem is actually the fact that it isn't calling the mailscript at all. I have tried numerous things and ultimately boiled it down to just a print message but even that isn't working. The rest of the email message is correct so once I figure that out I can test your solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @ChrisWing , I would recommend trying the notification with just the one mail_script line. The add the others. I also suspect your second line is wrong. If sysapproval is a field of current that would work but I think you should be using current and not sysapproval.
${sysapproval.description}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
actually everything shows up except the mailscript including the approval description but I don't think I want that in the end anyways. Thanks for the suggestion though Joseph

