Adding "requested for" field on Approval page

jeff_perzel
Kilo Explorer

I am trying to show who a catalog item was "requested for" on the approval page.
Managers are getting approval items, and clicking the option to view the approval, which is good.   But there is no indication of who this request is actually being requested for.


I tried personalizing the form layout to show the information, and i thought i had it figured out, but it ends up showing a blank field.
This is only our second week using SNOW.

 

Seems like something i should have been able to figure out by now, still have a lot to learn

 

Anyone have any advice on what I'm missing?

5 REPLIES 5

salemsap
Tera Expert

Hi,


Actually we can't add that field in approval page since we dont have any relation between request and approval table.


I will give you 2 suggestion.


1.you can add opened by instead of requested for if both are same in all cases


2. create a field(reference to sys_user table) and a business rule.In business rule write a glide record to get the requester for value and populate it in our custom field once the approval created..



Thanks,


Alex


randrews
Tera Guru

the problem with adding requested for to the approval page is the approval page lists all types of approvals;   items, changes, requests etc... so adding requested for from the requested item table will look silly on a change...



what we did was to create a variable set with the requested for and <if needed> approving manager.. we then add this to each item...



then when they expand the approval so it shows the item variables it will show the requested for.


Doug,



Thanks for the suggestion, I think this is exactly what I'm going to end up needing to do.
Would this end up being a "reference" variable, or a "single line text" variable in the set?



I'm playing with it now to see what I can do.



Thanks


Jeff


we set it as a reference variable with a default value of "javascript:gs.getUserID();"



that way it defaults to the person filling out the form... we also made two variable sets vs_employee <for items that do not require managers approval> and vs_employee_manager for items that do need managers approval...



if you are going to put the approving manager in there add an onchange client script keyed to the requested for ...



function onChange(control, oldValue, newValue, isLoading) {


    if (newValue) {


          var req4 = g_form.getReference('requested_for');


          g_form.setValue('v_approving_manager',req4.manager);


          g_form.setReadonly('v_approving_manager', true);


          if (req4.manager == '') {


                alert("Unable to obtain manager information, please contact your manager to order catalog items.");


                //window.location="home.do";


                return;


          }


    }


}



________________________



one other note.. we also have a variable called "Order guide name" we include in both variable sets... when an item is in an order guide it populates that variable <we hide it on the item forms> you can then use that variable to make the requested for read only on order guide items.. so that you don't end up with people opening an order guide for employee a.. and adding items for employee b to it.,,..



we also use the order guide name to lock down choices on the item.. for example if they are using the terminate order guide.. the items will all preselect the option to disable or remove access and make that variable read only.


for new hire they only get add access options.