- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2016 07:09 AM
Hello All,
I am looking for some advice on how best to approach this, I'll try and explain what I am trying to achieve.
I am trying to build a process where people request access to File Shares and the approval goes to the owner of that share.
On the request form they select the share (This is a Lookup Multiple Choice referencing the cmdb_ci_storage_fileshare table)
I can set the approver to ${configuration_item_owned_by} but I need to be able to set the configuration based on what they select in the above variable.
I know there will be an easy answer to this, I can tell I'm overlooking something.
Any help would be greatly appreciated.
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2016 07:22 AM
Hi Harry,
I can't remember whether you can dotwalk a lookup select box type variable, so you may be better off going with a reference variable there. In order to send the approval to a group on your file share record you'll need to use an approval script in your approval workflow activity.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2016 07:22 AM
Hi Harry,
I can't remember whether you can dotwalk a lookup select box type variable, so you may be better off going with a reference variable there. In order to send the approval to a group on your file share record you'll need to use an approval script in your approval workflow activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2016 10:28 AM
Thanks Brad, I have set the variable to reference the cmdb_ci_storage_fileshare table.
The approval script I have used doesn't seem to be working.....again, I'm probably missing something obvious.
var answer = [];
var fileshare = new GlideRecord("cmdb_ci_storage_fileshare");
fileshare.addQuery("owned_by",current.variables.nfs_leeds_shares);
fileshare.query();
if(fileshare.next()){
answer.push(fileshare.owned.by);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2016 03:34 AM
Got this to work Brad thanks to your Info.
Set the variable on the catalog item to a reference field, referencing the configuration item table and used the following script to lookup the owner of the CI:
answer = (function(){
if (current.variables.nfs_leeds_shares.owned_by) {
return current.variables.nfs_leeds_shares.owned_by.toString();
} else return "";
})();