This discussion is archived
1 Reply Latest reply: Apr 3, 2013 9:35 AM by Bunty RSS

Dynamically changing Restricted List

Boopathy Newbie
Currently Being Moderated
Hi,

We have a requirment,

Two team IT and HR are there. Each has it's own set of Reviewers and Approvers.
We have created a custom profile form where we have a metadata field for reviewers and approvers.
Based on user role, i am able to set up default values of Reviewer and Approver. This is fine. But IT team has two reviewers and i need to display as them drop down list.
Using Restricted list i can give the values, but i dont have the option to filter out reviewers based on role in restricted list.

Can someone guide me in how to dynamically change the restricted values in UCM.

Regards,
Boopathy
  • 1. Re: Dynamically changing Restricted List
    Bunty Journeyer
    Currently Being Moderated
    not sure about dynamic restricted list in rules but you can achieve your requirent in many ways...
    for description lets assume
    2 roles IT and HR
    2 metadata xApprover and xReviewer
    Option1:_
    create 2 new rules
    1) ruleIT
    - add xReviewer and xApprover fields and set the restricted list for IT team.
    - In General Tab, check the "User rule activation condition" and in custom tab use the following code
    ((userHasRole("IT"))
    2) ruleHR
    - add fields and define restricted list ...go to custom tab and add
    ((userHasRole("HR"))
    finally, add the above rules to yoru profile.

    Option2:_
    another option ...
    define idoc include as
    <@dynamichtml myCustomInclude@>
    <$if not isUploadFieldScript$>
         <$if userHasRole("HR")$>
              <select name="xApprover">
              <option value="Ap1">Ap1</option>
              ..
              ..
              </select>
              <select name="xReviewer">
              <option value="Re1">Re1</option>
              ..
              ..
              </select>
         <$elseif userHasRole("IT")$>
              ..
              ..
              ..
         <$endif$>
    <$endif$>
    <@end@>
    Go to your Profile Rule and Edit the fields(xApprover,xReviewer)
    ...in "Edit Rule Field xApprover" window, select "Use custom include" and enter the above include name "myCustomInclude"

    if you need any field validation, put it in else block of isUploadFieldScript

    Edited by: Bunty on Apr 3, 2013 11:32 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points