Requirement:
If the user that has logged in is SADMIN then and he goes to Administration – Data > List of Values view then he should only be able to see LOV’s with Type as SR_STATUS.
My Thoughts:
This is a really strange requirement as SADMIN is suppose to have access to all the Admin views . If this requirement was to restrict some particular user then it would make sense functionally.
Now imagine that a particular person is responsible for managing SR Status LOV’s and if we give him access to all the LOV’s then it might confuse him and also he might change something which might affect other functionalities. So, it makes sense to give him only access to LOV’s of Type SR_STATUS so that he doesn’t change anything else accidentally or intentionally.
Solution:
Now, not going into detilas of Pro’s and Con’s of this requirement we will jump on to the Solution of this requirement.As always there are 2 ways to do things in Siebel
Scripting Solution:
On the Server Script of List of Values List Applet write the code given below in WebApplet_Load event.
if(TheApplication().GetProfileAttr('Me.Login Name') == "SADMIN")
{
var BC = this.BusComp();
BC.ClearToQuery();
BC.SetViewMode(3);
BC.SetNamedSearch("LOVType","[Type] = ‘SR_STATUS’”);
BC.ExecuteQuery();
}
If you notice in the code I have used SetNamedSearch method because I don’t want user to see any other values. If I would use SetSearchSpec or SetSearchExpr then user can override it by issuing a blank query from UI, but it is not possible with SetNamedSearch. To know more details about SetNamedSearch please read the following post.
But why go for scripting when you can do it without scripting.
Solution without Scripting:
You can use personalization in this situation:
- Goto Administration – Personalization > Rule Sets
- Create a New Rule Set with following details
Name: List of Values - In the Rules List Applet Click New and provide following details
Name: Restrict LOV
Rule Type: Expression
Sequence: 1 - In More Info form applet provide the following details
Conditional Expression: GetProfileAttr(’Me.Login Name’) = ‘SADMIN’
Include Expression: [Type] = ‘SR_STATUS’ - Now go to Administration – Personalization > Applets
- In the List Applet create a New Record
Select “List of Values List Applet” from the Name Pick Applet - In the Rule Set List Applet below it Click on New
- Select the ‘List of Values’ Rule Set that you created Previously in 2nd Step
- Give the Sequence as 1
And you are done… Just log off and login and go to Administration – Data > List of Values and you should only be seeing the values only of Type = SR_STATUS.
Hope this helps.


(7 votes, average: 3.57 out of 5)
9 Comments at "Restricting List of Values"
Hi Neel,
I was trying to implement this but while adding Include Expression [Type] = ‘SR_STATUS’ , I was not getting Type field as this is not present in the BC.
May I know the solution for that..?
I tried it in Siebel 7.8 and it works.
You need to provide name of the field that is mapped to Type in UI.. and it should work.
So go to List of Values List Applet and check to which BC field is mapped with display name as “Type” in applet
Ya I checked it is mapped to ‘Type’.
Moreover in the Expression Builder, When I click on Business Component Field I am not getting even a single element.
Do I need to mention BC name anywhere..?
Hi,
I need to know how to SARM in siebel 8 call center
Thanks & Regards,
Prathiba b
No, you don’t you can use it directly.
In the Include experssion field just paste the search experssion given in the post. But make sure you put the single quotes manually as pasting from webpage can sometime lead to problems
Ya finally it worked..Thanks a lot.
Neel, Can u post some more practical scenario in the blog so that a person like me can try to implement it in free time and learn something new.
we can achieve this through configuration itself.
Neel, Thanks for the above..
but,in the following condition..
BC.SetNamedSearch(”LOVType”,”[Type] = ‘SR_STATUS’”);
why are you querying with the value “LOVType”.
I have achieved this through configuration as below.
1. Create claculate field as below
Status = IIF(LoginName()=”SADMIN”,”SR_STATUS”,[Type])
2. Set Search spec of List of Values BC as below.
[Type]=[Status]
that is it you are done.
Comment Now!