The CreatorCon Call for Content is officially open! Get started here.

Service Portal (Catalog Item) List Collector field - getDisplayValue / getDisplayBox does not work

MWright1
Giga Guru

Hi all,

 

I have seen a bunch of posts regarding this.  However have not found any solution suitable to my needs.

 

Here is the situation:

1. I have a List Collector item in my Catalog item (accessed through the Service Portal).  This item is a list of groups the user belongs to.

2. I need to get the name of the items to remove the groups that contain a certain phrase.  For example:  remove the user's association with the groups that contains the words "technician" in the group name.

3. So I need to get the names of the groups the user belongs to; not the id.

 

So i have tried the following to get the display name of this field - neither worked:

val = g_form.getDisplayValue ('user_groups'); 
val = g_form.getDisplayBox ('user_groups');
 
This worked but gives me the id - not what I need:
val = g_form.getValue ('user_groups');
 

Any assistance would be highly appreciated.

 

Thanks,

M

 

1 ACCEPTED SOLUTION

Since you've already made the trip to the server to get the group sys_ids, you could also get the group names at the same time to use for the name test and populating both list collectors with sys_ids.

View solution in original post

6 REPLIES 6

Since you've already made the trip to the server to get the group sys_ids, you could also get the group names at the same time to use for the name test and populating both list collectors with sys_ids.

Hi Brad,

Thanks.  I am actually doing that exactly.  I am going back to the Script Include to see if I can get the name too.  Seem to be the most practical solution at this point.

Thanks.

M