Remove a specific value from a glide_list field

LdR
Tera Expert


Hello,
I have a glide_list field

find_real_file.png

from which, after pressing a button (UI Action), I want to remove a certain value.

How could I do?
Thanks ☺

8 REPLIES 8

Hi @Ankur Bawiskar 
I have a similar kind of requirement but the twist here is.
I'm working on knowledge form where I created restricted user field which is glist list so whatever group I add in this list the same information should get copied to Can read field. 

Let's say I added knowledge A, Kknowledge B in restricted group and after saving form I realized it should only have knowledge A.
So can read field should have knowledge A at the end but it is having Knowledge A, Knowledge B,knowledge A.
Below the script which I'm using


var userList = current.getDisplayValue('u_restrict_user');
var splitUsers=userList.split(','); //Replace u_restrict_group with correct field name
for(var i=0;i<splitUsers.length;i++)
{
//gs.addInfoMessage("Hi:" + splitrestrictgroup);
current.can_read_user_criteria=current.can_read_user_criteria+','+splitUsers[i];
}

 

Can you guide me through this?

Can you please post a new thread for this as this question is quite older.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

I have done it. Let me give you the link


https://community.servicenow.com/community?id=community_question&sys_id=461e9000db21f0101cd8a345ca96194c

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader