Forms Builder - Rule based on user's role

Hosam Salem
edited January 31, 2013 in Documentum #1

Dear All,

Within my forms builder form, I define a rule for a control such that it is editable only for one user role and not editable for all other roles.

But, when i open the form, the control is always not editable, even if I'm logged with the role defined for that control.

Please advice.

Thanks in advance.

Tagged:

Comments

  • DCTM_Guru
    edited December 11, 2012 #2

    Please post screenshot of your rule.  Also, have you restarted the app server?  I have noticed that role-based configuration changes do not always take affect by simply logging out and logging back in.

  • Hosam Salem
    edited December 11, 2012 #3

    Dear Johnny,

    Thanks a lot for your reply.

    Here is a screenshot for the rule:

    Forms Builder Rule.jpg

    I don't think that an app. server restart is needed as the rule is actually applied but not correctly.

    The issue is that in the runtime, the role is always evaluated to not be "ba staff personnel coordinator", although this is not really the case, as I tried with logging with this role and others too.

    Any other ideas ... ?

  • DCTM_Guru
    edited December 11, 2012 #4

    Role name cant have space in them.  It needs to match the name as specified in the role object (group_name on dm_group object).

  • Hosam Salem
    edited December 12, 2012 #5

    You are correct, Johnny, as i tried to use another role that has no spaces in the rule (ts_designer) and it works.

    But the idea is that the content server supports space in role name, along with that the rule used in the form is auto-generated through a dialogue. That's why i consider this behavior as a bug in Forms Builder.

    Now, I have no options other than renaming the mentioned role and remove all spaces .

    Thanks a lot for you help, Johnny

  • DCTM_Guru
    edited December 12, 2012 #6

    "...But the idea is that the content server supports space in role name,"

    There is a difference between the actual role/group object_name and role/group description.  The object_name cannot have spaces, but the description can.

  • Hosam Salem
    edited December 12, 2012 #7

    Sure, but I'm concerned with "group_name" attribute as this is the one that the rule in a forms builder form is checking.

    Anyways, before going with the option of renaming the role, I performed a workaround, as follows:

    I designed an adaptor than checks whether the logged user is member of the specified role or not, a control will hold the result of this query. Then the affected control is editable or not based on this control value.

    Hope this issue is resolved in DCTM 7.0

    Thanks again for your interest, Johnny

  • malimaot
    edited January 28, 2013 #8

    Hi LimoMan,

    I am interested in this part:

    I designed an adaptor than checks whether the logged user is member of the specified role or not, a control will hold the result of this query. Then the affected control is editable or not based on this control value.

    I am trying to do just like that, but without success.

    In my case, I have an invoke button, I want to hide it when there is no row in a table, so I designed an adaptor to run the DQL, and the result is shown in a text field.

    In the rule tab, I configured my invoke  button to be hidden only if the value of my text field is 0, but it's always hidden even if I have an other value in my filed.

    Do you have an idea, or do you remember how you did it?

    thanks.

  • Hosam Salem
    edited January 29, 2013 #9

    Hi malimaot,

    You have to check the following:

    1. The data type of the text box holding the result of the DQL query is "int"
    2. The type of the returned value from the adaptor, which represents the number of rows in your table, is "int"

    Try again and inform me about the result.

    HTH,

    LimoMan

  • malimaot
    edited January 31, 2013 #10

    Hi LimoMan,

    Thanks for your replay, and sorry for being late.

    Well i tried what you said, but I still have the problem. In fact, I am using a data source adaptor, and when I use it as a source for my text field, the count of rows is not showed in my text field, but I have to check the "execute adaptor when form initializes" in the special tab, I have the value assigned to the txt field.

    Can you what type of adaptor did you use?