GlideappVariablePoolQuestionSet

Simran321
Tera Expert

We have a catalog item "Hardware Request". The catalog item on the portal asks for Address and Phone number. However,  we have notification triggered to manager to approve if the laptop is non standard. We do not want manager to see employees phone number and address. The current configured notification is calling GlideappVariablePoolQuestionSet which displays all the field in Catalog item. 

However, For this particular approval notification I want to hide "Address" and "PhoneNumber" fields from the catalog item. What is the best way to accomplish this?

Can we just hide those two fields? or Is there any script that is the alternative of GlideappVariablePoolQuestionSet?

2 REPLIES 2

Kieran Anson
Kilo Patron

Could you share the script?

I assume you're doing something like the below:

var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(req.sys_id);
set.load();

var vs = set.getFlatQuestions();

for (var i=0; i < vs.size(); i++) {

if(vs.get(i).getLabel() != '' && vs.get(i).getValue() == 'true') {

gs.print( vs.get(i).getLabel() + " = " + vs.get(i).getDisplayValue() );

}

}

 

One option to use is to use isVisibleSummary() function which returns true or false based on the checkbox on the variable.

 

find_real_file.png

Helpful to me, thank you.

Do you know where is isVisibleSummary() function defined? In case I woud like to control some other field, I would need to create own function.

 

/Petr