Task Based UI @ Siebel 7.8 | Next Tip »Home

InList and GetProfileAttrAsList functions

OkAvarageGoodVery GoodExcellent (8 votes, average: 4.13 out of 5)
Loading ... Loading ...

 This is a very useful tip shared with us by “Kavitha Devarajan” known as “Kavi” to us.

==================================================================

Requirement:

Disable the Button if user has ‘Junior Sales Representatives’ responsibility assigned to him.

Thoughts/Assumptions:
This requirement is quite different for me, since every time we configure enable and disable button functionalities based on Position Names.

We have a button called as “create Quote” with method name as “CreateQuote” on Quote list applet based on Quote BC. We would like to enable/disable this button conditionally according to above given requirement.

Solution:

  • In Quote BC, create Calculated Field with following details:
    Name: ResponsibilityFound
    Calculated Value:IIf(InList(“Junior Sales Representatives”,GetProfileAttrAsList(“User Responsibilities”))).
  • Write Script on Quote List Applet
    if (MethodName == “CreateQuote” && this.BusComp().GetFieldValue(“ResponsibilityFound “) == “Y” )
       {
         CanInvoke = “FALSE”;
         return( CancelOperation );
       }

Explanation:

In the above expression, ‘User Responsibilities’ is a MVF field in “Personalization Profile” BC. The Link is based on Responsibility/Personalization Profile BCs. This field stores the List of Responsibilities assigned to the user of Siebel Application.

GetProfileAttrAsList(“User Responsibilities”) returns the MVG Value as a comma separated list.

From this list of responsibilities, required Responsibility Name is checked using ‘InList’ function.

InList function accepts 2 arguments.

  1. A string which is to searched.
  2. A comma separated from which the string should be searched.

In our case we are searching for “Junior Sales Representatives” from a comma separated list of responsibilities returned by GetProfileAttrAsList.

Hope this helps…!!
Thanks Kavi

  • Share/Bookmark

Related Posts


Article by neel

Authors bio is coming up shortly. neel tagged this post with: Read 387 articles by neel
  • ram
    yes,its very nice solution.
  • shreyakesh
    How to test if it is working for that particular responsibility?
  • Sridhar
    Hi,

    Its really useful to us.

    Regards,
    Sri...
  • Pankaj Singh
    Nice post actually I was looking for something like this where I can get the responsibility of logged in user and perform certain action based on that. Really helpfull.

    I think the correct expression is :

    IIf(InList("Junior Sales Representatives",GetProfileAttrAsList("User Responsibilities")),"Y", "N")

    Thanks
  • Ayoub
    Wonderful, I although agree with Franklin, using Applet user property is more elegant. But the function in the calculated field is very smart and useful.

    Thanks
  • Kavitha Devarajan
    Yes you can even use Calculated field and User Property to implement the above requirement..!!

    --Kavi
  • Franklin Hooboo
    Rather than scripting on the Applet you could use the calc field and an Applet User property "CanInvokeMethod: YourMethod" to prevent those users from invoking your button?
blog comments powered by Disqus

Polls

Do you like the new Comment System and new look to Site?

View Results

Loading ... Loading ...