- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2016 11:44 AM
Hi,
We have a slush bucket field named "Please select which access you would like". The variable type is "List collector" and it is referencing the CMDB applications table.
Requirement: In the "slush bucket" for the service catalog access RITMs…..we are thinking to have an option called " Consultant Pharmacist Bundle". When selected, a java script will run that reads a table that contains the apps that are defined to this bundle, and then populates those apps on the right side "slush" for access…??? As we add more apps to the bundle, the program won't need to change because we're reading from a dynamic table, versus a hard coded list
Any help on this will be appreciated?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 04:31 AM
I have found the fix for the slushbucket,
the line leftbucket.onchange(); will refresh the list again and there is no need for them to click on the slushbucket again
Line number 33, thats the addition I did
Change your code to below -
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Abel Tuter = 62826bf03710200044e0bfc8bcbe5df1;
//ACME Employee = 107c14341f1310005a3637b8ec8b7008;
//ACME ITIL = 797d14341f1310005a3637b8ec8b7010;
var varName = "userlist";
var leftBucket = gel(varName + '_select_0');
var rightBucket = gel(varName + '_select_1');
var selectedOptions = rightBucket.options; //get the options in right bucket
//Get an array of all option IDs to move
var selectedIDs = new Array(); //construct the id array [0,1,2,...]
var index = 0;
for(var i = 0; i < selectedOptions.length; i++){
selectedIDs[index] = i;
index++;
}
for(var i = 0; i< selectedOptions.length; i++){
if(selectedOptions[i].value == '62826bf03710200044e0bfc8bcbe5df1'){//check for Abel Tuter
moveSelectedOptions(selectedIDs, rightBucket, leftBucket); //move the options
//remove none option from right
if(rightBucket.options.length == 1 && rightBucket.options[0].text == '--None--'){
rightBucket.options.length = '0';
}
//Add the value that you want to add here, rightbuckt, sysid, displayValue
addOption(rightBucket, "107c14341f1310005a3637b8ec8b7008", "ACME Employee");
addOption(rightBucket, "797d14341f1310005a3637b8ec8b7010", "ACME ITIL");
sortSelect(rightBucket);
leftBucket.onchange();
break;
}
}
}
Mark it has correct, if it has resolved the issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 08:20 PM
Its great to know it worked, thanks for your feedback
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2016 02:33 PM
Hi Srikanth,
Hope you're doing well..Do you have any idea on Pop ups in Service Catalog. I was trying to write a UI action and UI page, however m unable to create the logic. How can we generate Pops when i click on a catalog item.
I posted the question at below link:
--------------------------------------
Is it possible to enable a Pop up dialog box for a catalog item?
We have a catalog item called "Wireless device". The approval policy of this catalog item has been changed recently and we want to inform all users who are creating tickets under this item about this change in the form of Pop up dialog window or Splash screen.
I want the Pop up to appear as soon as i click on the Service Catalog item "Wireless Device" which will prompt the user to either accept/reject the policy. If the user accepts the policy then the wireless form will appear else the page will be redirected to the Service Catalog.
Thanks,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 01:45 PM
Can this be done from a record producer? I'm not having any luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 08:01 AM
Hi Srikanth, Hope you're doing good. I have one doubt.
We have used the below code to move all the preselected options in right bucket to left bucket when someone selects consultant phramacist package "
- if(selectedOptions[i].value == '62826bf03710200044e0bfc8bcbe5df1'){//check for Abel Tuter
- moveSelectedOptions(selectedIDs, rightBucket, leftBucket); //move the options
I want only those applications to be moved to left bucket which are mentioned in Package if someone preselects them, not others.
Thanks,
Rahul kathuria