12-18-2012 02:33 AM
This topic was raised a lot of times but still I can not find a proper solution.
For example, when you click on Open change from menu the list of the available categories are displayed on the screen (from menu is called RAD cmc.open.from.menu). The same list is displayed if you do from some record (for example Change) Related>Change>Open.
Which application is building the list of the allowed categories?
Main goal is to limit the list of offered categories for exact situation. For example if i click on some button the list should contain only 2 exact category and not all existant in the system.
12-18-2012 04:03 AM - edited 12-18-2012 05:49 AM
I don't know if this approach is suitable to your requirements, but check this thread:
If you decide to use the method is suggest, I'd recommend hiding the original display options which opens a new change and making own change open display actions instead.
By using wizard it's easier to make own queries to change category file without tampering the OOB way to do things.
12-18-2012 04:03 AM
As you are aware that menu link is calling "call.open.process" application and here you can see it is calling process "call.open.process" and passing the environment variable $G.cm3r.environment by variable "record" and same is passing to cm.open process in RAD "cm.open". So feels that here the change environment record(in variable record) defines the accessible category.
So you might try to alter the record variable or $G.cm3r.environment temporarily.
Assign Kudo, if found post useful and mark it accepted if solves the issue.
12-18-2012 06:39 AM
Thank you for answers!
just to sort it out. I have written scripts which add new change but this is a bit different situation. It must be close to OOB.
@Kelakek - I was thinking of wizards but there are bunch of troubles with taht approach. Still i need similiar to normal change opening form with the whole number of fields (wizard has much smaller window size). Then i need to pass the fields from the parent record (the one from which the button is clicked), like it is done via screaltion. So at the moment wizards is the least option which i want to take.
@Piku - I was trying to use us.screlate.options RAD but it is working fine for change to change creation. The current goal is to initiate change with limited category offering from device. Was trying to play with allowed.cats in $G.cm3r.environment, but it is not always working.
12-19-2012 07:37 AM - edited 12-19-2012 07:38 AM
I think editing the values in the $G.cm3r.environment variable is really the best way to go here that gives you the most power for the simplest code.
What part of this solution was giving you trouble? I'm pretty sure this is the best way to go to get what you're trying to get...At least until HP comes up with something new.
12-19-2012 11:32 PM
Hello Jacob and thank you for reply.
In fact everything ended with total removal of standard mechanism of opening change (mainly they are added now based on scripts) and only for that one spot which i meant in this topic we limited the categoryes by setting false in the category definition.
Regarding category filtering based on environment - we were trying to do similiar functionality based on it but, setting specific categories for some exact spot was not working from the first run of the script (it was showing all categories regardless of JS which was setting only exact once ) and only on the second calling the list was limited. Probably the person who wrote the script made it not appropriate spot (maybe post JS or something) but it defently was not 100% working mechanism.
Anyway in future i will try to do it again but at the moment simple limitation in category difinition solved the problem.
Thanks for answers everyone.