- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 02:19 AM
Hi,
I have a requirement where Manager should be allowed to edit the group members ( add / remove ) of the groups that he / she is managing.
I have created below variables in Catalog item.
1. Reference : User Assignment group table (sys_user_group) : This displays the groups which are managed by 'logged In' user. I put a reference qualifier here to display particular groups.
2. List Collector :
I am thinking to use 'Group Edit' form / page on the Catalog item ( I think this will make my work easier) , pls find the attached screenshot
This form displays the 'existing users' of the groups on the right side and Other users on the left.
Is it possible to have that complete page in the Catalog item ? Where to find that page ?
Is there any other approach you think will be easier ?
Thanks,
Abhijeet
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 03:27 AM
here is the code for changing the filter of slush bucket and preloading the selected options on the right side... make changes according to your requirement.. Hope this helps
onchange function()
{
if(!isLoading)
{
//ci is the variable name of slush bucket. replace ci below lines with your variable name
var query = "^u_active=" + newValue+"^name!=";
cig_filter.reset();
cig_filter.setQuery(query);
ciacRequest(null);
if(newValue=='true')
{
setTimeout("defaultSelectedOptions();", 5000);
}
}
}
function defaultSelectedOptions()
{
try
{
var loadInitialValues = '6fd6bc05871d10005ea5476dff434d69,bbd7bc45871d10005ea5476dff434dca'; //values to load
var varName = 'ci'; //slush bucket variable name
var leftBucket = gel(varName + '_select_0');
var rightBucket = gel(varName + '_select_1');
rightBucket.options.length = '0';
var leftOptions = leftBucket.options;
var selectedOptions = loadInitialValues.split(',');
var selectedIDs = new Array();
var index = 0;
for(var i = 0; i < leftOptions.length; i++){
for(var j = 0; j < selectedOptions.length; j++){
if(leftOptions[i].value == selectedOptions[j]){
selectedIDs[index]= i;
index++;
}
}
}
moveSelectedOptions(selectedIDs,leftBucket, rightBucket, '');
}
catch(err)
{
alert(err);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 02:34 AM
Hi Abhijeet,
You can use the List Collector type of variables to display the group members. You will need to write an onChange Catalog Client script that will run whenever the group is changed. It will update the filter accordingly.
Below link might be useful for the same
You can attach a proper workflow to above catalog item that will get necessary approvals and open tasks for concerned groups. But, if there are no approvals needed, it is better to create a record producer with above 2 variables. You can use the processing script to update the group details in that case.
Thanks,
Mandar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 03:10 AM
Hi Mandar,
That's really helpful ! Thanks a ton !
I dont know how to manipulate the right side of the slush bucket. e.g. If I select a group; it should display the members of that group on the Right side ( That shows those members are already added to the group )
I would also like to know how to manipulate 'Add' and 'remove' button on slush bucket ? Where to write a code for that ? ( say if existing users of selected group are displayed on the right side ; remove button will remove those users from selected group )
-regards,
Abhijeet

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 02:36 AM
the approach seems okay to me but dint get the question , where to find page means ? what are referring here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 02:46 AM
Hi Kalai,
I am referring tot the form / page that gets displayed while editing group members of particular groups.