The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Friday 3 May 2013

Related Contents in PeopleSoft



Related content is a new feature introduced by People Tools release 8.52. PeopleSoft has enhanced it and made it much better in the release 8.53.

Related content is a powerful feature introduced by PeopleSoft. With related content, you will be able to bring up data from another component while within a component and the data from the second component will be related (based on the values in the first component) to the first component. To explain it, if you are at voucher component and entering a vendor, the related content service will bring up the details of the vendor in a second frame on the same page. The second frame will be on the right side of the main component or can be on the bottom based on your configurations. Having said that I will explain how to create a related content for your own application. Believe me; it is much simpler than you anticipate.



Related content need not be a PeopleSoft component. You can also bring up external url’s, iscripts, PS Query, pagelets etc. For this you need to create a related content service, which I will explain in the next post.

Let’s see how you can establish a related content service which will open an existing content reference as a related page in a new frame.

Navigate to: People Tools > Portal > Related Content Service > Manage Related Content Service

Now click on the Assign Related Content to Application Page link at the bottom of the page.



It will open up all your menu navigation in a tree structure. From that tree expand the required folders to reach down to the content reference or component to which your new related content should be applied.



Now on the landing page you have two grids for component level and page level related content services. If you add anything to page level, the related content will be visible only for that page. On the other hand if you chose to add on component level, then the related content defined will be visible across all the pages of the component.



Now to add another registered content reference as a related content to the selected component, you should select Service Type as Content Reference. The Service service type is to be selected when you plan to have query, iScript or external url as a related content. For that you need to define a service first, which will be covered in the next post.

Now you click on the prompt button. It will again bring up the menu in tree structure. You have select your component or content reference from the tree structure which will be added as a related content to the base component. Now you can give a meaningful label to the related content added and click on configure.



This is the page where you define the relation between the base component and related component. This page will bring up all the search keys of the related component. You have options Required Flag to, Refresh Service on change and Is Value required. The refresh service on change property if checked will refresh the related component if you change the value in the base component. This is helpful where the keys of the related component is present on the base component as an editable field.

Now to map the fields of both component, you have Mapping type options. There are different mapping types. If you select Key Value as an option then in the prompt you will get the key fields of the base component. You select the corresponding field. If mapping type is selected as Fixed Value, then you will get an edit box to enter the value. If it is System Variable, then in the prompt you will get a list of system variables like %Date, %UserId and all.

On the bottom of the page you have another important parameter called service filter. This is used when you want to hide or unhide the related content from the base component based on the values\conditions on the base component. For this you need to create an application class.
The class should extent a base class and the linkVisible method should return Boolean. Based on the return value, the related content is made visible\hidden. I am pasting a sample piece of code.

import PT_RCF:ServiceFilter;

class RCFilter implements PT_RCF:ServiceFilter;
   method linkVisible() Returns boolean;
end-class;

method linkVisible
   /+ Returns Boolean +/
   /+ Extends/implements PT_RCF:ServiceFilter.linkVisible +/  
/* Replace it with your own logic or conditions. */
   If %Mode = "A" Then
      Return False;
   Else
     Return True;
   End-If;  
end-method;

In the Service Filter parameters of the configuration page, give the name of the application class you have created. If you want the related content to be displayed always then you can ignore this.

Once you have done this, click on ok and save the component. Believe me you are done with setting up related content service for your base component. If you want to add more components to your base component, just click on the + button on the grid and follow the same steps. You have two more pages on this configuration Configure Related Actions (which I will cover later) and Configure layouts. When you have more than one related content tagged to a page, then Configure Layouts page will come as handy. There you can define the order and structure in the content should be displayed on the base component which is pretty much simpler and you could figure it out yourself.

Hope it give you a better understanding on configuring related contents for a component.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Followers