1 Reply Latest reply: Apr 3, 2013 11:35 AM by Bunty RSS

    Dynamically changing Restricted List


      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.

        • 1. Re: Dynamically changing Restricted List
          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
          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
          2) ruleHR
          - add fields and define restricted list ...go to custom tab and add
          finally, add the above rules to yoru profile.

          another option ...
          define idoc include as
          <@dynamichtml myCustomInclude@>
          <$if not isUploadFieldScript$>
               <$if userHasRole("HR")$>
                    <select name="xApprover">
                    <option value="Ap1">Ap1</option>
                    <select name="xReviewer">
                    <option value="Re1">Re1</option>
               <$elseif userHasRole("IT")$>
          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