Creating metadata value relationships

I was recently asked an question about an interesting use case. They wanted content to be submitted into UCM with a particular ID in a custom metadata field. But they wanted that ID to be translated during submission into an employee name in another metadata field upon submission.

My initial thought was that this could be done with a dependent choice list (DCL). One option list field driving the choices in another. But this didn't work in this case for a couple of reasons. First, the number of IDs could potentially be very large. So making that into a drop-down list would not be practical. The preference would be for that field to simply be a text field to type in the ID. Secondly, data could be submitted through different methods other then the web-based check-in form. And without an interface to select the DCL choices, the system needed a way to determine and populate the name field.

So instead I went the approach of having the value of the ID field drive the value of the Name field using the derived field approach in my rule. In looking at it though, it was easy to simply copy the value of the ID field into the Name field...but to have it look up and translate the value proved to be the tricky part.

InfoCheckinLabels.png

So here is the approach I took...


  1. First I created my two metadata fields as standard text fields in the Configuration Manager applet.

    md_emp_name.png

    md_emp_id.png


  2. Next I create a table that stores the relationship between the IDs and Names.

    md_table.png

  3. I then create a View into that table and set the column to the EmployeeID.

    md_view.png


  4. I now create a new Application Field and set it as an option list using the View I created in the previous step.

    md_applicationfield_600.png

    The reason I create it as an Application field is because I don't need to display the field or store a value in it. I simply need to make use of the option list in the next step...

  5. Finally, I create a Rule in which I select the Employee Name field and turn on the 'Is derived field' checkbox. I edit the derived value and add a new condition. Because the option list is a Application field and not an Information field, I can't use the Compute button. Instead, I insert this line directly in the Value field:

    @getFieldViewValue("EmployeeMapping",#active.xEmployeeID, "EmployeeName")

    The "EmployeeMapping" parameter designates that the value should be pulled from the EmployeeMapping Application field that I had created in the previous step. The #active.xEmployeeID field is the ID value that should be pulled from what the user entered. "EmployeeName" is the column name in the table which has the value which corresponds to the ID. The extracted name then becomes the value within our Employee Name field.

    md_rule_600.png


  6. That's it. You can then add additional Rules to make the Name field read-only/hidden on the check-in page and such.

Comments:

Hey Kyle; Can you next cover security filters - Creating a relationship between what values are displayed dependant on the users security access.. I have always found issues with this from 7.x+ and it would be good to see the approach you take on setting this up.

Posted by John Sim on December 16, 2010 at 07:17 PM CST #

Hi Kyle, Can we achieve same using "getViewValue" function like
<$getViewValue("EmployeeRecords_View", #active.xEmployeeID,
"EmployeeName")$>
instead of using "getFieldViewValue" function and creating EmployeeMapping application field.

Posted by guest on October 05, 2011 at 11:56 PM CDT #

Ah, you're right! That does make it simpler to get the value right from the view. Guess I was focused on the 'getFieldViewValue' function and didn't think about just the 'getViewValue' one.

Thanks,
-Kyle

Posted by Kyle Hatlestad on October 06, 2011 at 11:19 AM CDT #

Hi Kyle

Can you please tell me how to create a interdependent option list. Find below my querry. Any suggestions would be greatly appreciated.

I was wondering if anyone can help me with regards to creating Option list. Whats happening in my organization is there are set of metadata values

a) Department
b) Operation
c) Process

Department is interdependent on Location. Operation is dependent on Department and Process is interdependent on Operation. Whats happening in my case is per say there is a department value ABC in a location called 1 and there is another department value called ABC in location 2. The operation values falling under both these departments are showing up in checkin page.

I wanted to see if anyone there can help me break this relationship.

Essentially, if I select ABC belonging to Location 1, only values for that location and department should show up and not the values for Location 2.

Thanks

John

Posted by jwillers on January 24, 2013 at 09:07 AM CST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today