Home Flexfields articles OA-Framework adding columns on Descriptive Flexfields

Wrapper

Sponsored links:



Designed by:

OA-Framework adding columns on Descriptive Flexfields PDF Print E-mail
Written by Administrator   
Monday, 28 June 2010 16:15

A requirement that comes up quite often is to change the functionality of existing forms in eBS. Oracle has made this easier in the last several releases with Forms Personalization for Forms based screens. And with the ability to personalize OA-Framework pages for web-based screens.

Recently, I was asked to add a checkbox to an iProcurement screen. And it seemed like a good idea to document this in an article.

Adding extra columns to an OAFramework-page is often thought to include using jDeveloper to change your VO and/or CO (View Object / Controlling Object). However, you can also make use of existing Descriptive Flexfields. They are usually already included in the View Object for the screen, and therefore you can add them with only a personalization.

Let's start with describing our requirements:

On the shopping cart screen, we need a checkbox to indicate whether the item has to be gift-wrapped. This checkbox needs to be persistent on the requisition. The shopping cart screen looks like below:

Notice the 'Personalize xxxx' links. They are controlled by the profile options: ‘Personalize Self-Service Defn’ and ‘FND: Personalization Region Link Enabled’. Set both to Yes for your user.

Before we can start the personalization, we first need to know which table this data is coming from. When you click the 'About this Page'  link (lower left), you get an overview of the components of this screen:

Here we can see that the descriptive flexfield available on this screen is PO_REQUISITION_LINES. We will start by creating a Descriptive Flexfield (DFF) on that structure. First we look up the definition in 'Application Developer:/Flexfield/Descriptive/Register'. We find that the title of the flexfield structure is 'Requisition Lines'. This allows us to create segments in ‘/Flexfield/Descriptive/Segments’.

Let’s create our segment:

Don't forget to remove the 'Required checkbox' on the next screen. I also removed the 'Displayed' checkbox, since we don’t need to show a flexfield. We’ll show only our checkbox.

Now it is time to add the checkbox to the screen. So we return to the shopping cart.

Click on the link ‘Personalize "Table containing items in the shop..."’ to personalize the table with shopping cart items.

We get a list of all items in this part of the screen. We can add new items, or personalize the existing items.

First we look for a good position for our checkbox. Let’s say after the item description. We’ll add our item to the top item: ‘Table: Table containing ….’. That way, it will become a separate column in the table. There is an ‘Create Item’ button in the middle column: XXX Insert create_item.

On the next screen we first have to choose the type of item we want to add. It is important to note that we can add a regular descriptive flexfield with Item Style ‘Flex’. This will create a flexfield item, including the flexfield functionality. In our case, we choose ‘Message Check Box’. This will give us a form with a lot of options.

The once that I entered are:

ID:                       XXX_GIFT_WRAP

Checked Value:     Y

Prompt:               Gift Wrapping?

Unchecked Value: N

View Attribute:     Attribute1

 

The last item is the table column where I created the flexfield. The other fields I left at their defaults. Make sure that Required is set to No. Or prepare to receive only gift-wrapped purchases.

After saving it, we have to make sure that it will appear in the right position. We can reorder the items with this button: XXX: Reorder. With this, we can move our item up, until it is under the Item description.

Finally, let’s test the personalization. We return to the shopping cart, and see our checkbox:

When we check it, and save the shopping cart, we can see that it has indeed been saved to the flexfield:

select *

from (select requisition_line_id,attribute1

      from po_requisition_lines_all

      order by requisition_line_id desc)

where rownum<2;

 

REQUISITION_LINE_ID  GIFT_WRAPPING

    208379  Y

 

Ok. The flexfield has been entered with a Y. Feel free to test the same with the checkbox unchecked.

 

There is one last thing to discuss. What happens when you enter the wrong attribute for the personalization. Well, I entered an attribute ‘Attribute’ which is not a valid column. Now when we return to the Shopping Cart, we get an error page:

Of course we can’t edit the item, because entering the page will already throw an error. To resolve this, we need to change the personalization with responsibility ‘Functional Administrator’. First we find out which page we were on exactly.

Choose ‘About previous Page’ on the first error page, and note the line under ‘Page’ that says ‘/oracle/apps/icx/por/req/webui/ShoppingCartPG’.

 

Now we go to ‘Functional Administrator’ and use the tab ‘Personalization’. We search for:

 

When we choose ‘Personalize Item’, we are returned to the personalization page for our shopping cart. Here we can correct our faulty personalization.

 

That finishes the basics. Try the different options and values for yourself, and see what works for you. Feel free to contact me, or leave a comment.

 

Last Updated on Monday, 28 June 2010 16:23
 
Oracle Tales, Powered by Joomla! and designed by SiteGround Joomla Templates