Approval User - Getting Skipped

John Vo1
Tera Guru

Can someone take a look at this and see why this Approval - User is getting skipped?   Second approval should go to the Application owner which is set to the configuration_item.owned_by

find_real_file.png

find_real_file.png

14 REPLIES 14

randrews
Tera Guru

ok now i am a little confused.. what table is the workflow running on... i assumed it was requested item but thinking it is not.. since the approval is set to configuration_item.owned_by



if this is on the requested item table <catalog item> then i suspect the configuration item isn't on the item table but in the variables.. which would explain why it isn't finding the approver.


Yes it is a select box variable with the question choices.


find_real_file.png



But in it's try to pull from the Configuration-Applications


find_real_file.png


ok so the approver is actually in a VARIABLE in a catalog item?? if so we will need to script adding the approver you can't take it from the form.. because variables aren't on the form...



so for example...



answer = [];


appr();



function appr(){


answer.push(current.variables.variable_name.owned_by);   // here you are going to dot walk to the owner.. assuming that the ci is a reference field on the form.. if it isn't you will have to query the database and get it.. then you can dot walk to the approver.


}


I think there are two issues here:



configuration_item.owned_by is pointing to the configuration item field on the requested item, not your variable



Your variable is a select list and not a reference field, so in order to get the owner, you'll have to do as suggested above and script finding the owner using a GlideRecord query. You'll reference the variable through current.variables.questionname.


HugoFirst
Kilo Sage

Check the approval record and see where the "Approval for" field is pointing.


That would tell you which record and table is involved.



find_real_file.png


EDIT: I also noticed a "Run Script" item in your workflow named "Set Configuration Item".


Can you check to see if this is working?


I recommend adding a log statement showing that it ran and indicating the value that was set.