- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2024 07:20 AM
Hii All i have two fields one field name is demo1 which is refrence type refrence is of group table , second field name is company which is list type and refrence give it of user table , now my requirement is that when i select any group in demo field how many user are in that group should populate in company field i make script include my script is below getGroupMembers: function(groupId) { var groupMembers = []; var gr = new GlideRecord('sys_user_grmember'); gr.addQuery('group', groupId); gr.query(); while (gr.next()) { groupMembers.push(gr.user.toString()); } gs.info('Group ID: ' + groupId); gs.info('Group Members: ' + groupMembers.join(', ')); return groupMembers; }, type: 'GroupMemberScriptInclude' }; now this script include need to call from refrence qualifier , here i do not know on which field refrence qualifier use to achive this i tried but no luck thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2024 02:49 AM
Hello @dheeru_1994 ,
You can write a onchnage client script on group field and depending on that you can set the value of list collector field by using simililar script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2024 01:31 AM
HII Sir
what if i need same value populate in list type because in our general form list collector type do not availble
so same thing can be achieve this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2024 02:49 AM
Hello @dheeru_1994 ,
You can write a onchnage client script on group field and depending on that you can set the value of list collector field by using simililar script include.