<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content



Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color
Home arrow Technical Articles arrow Miscellaneous Technology arrow Smart Descriptive Flexfields
This website has now moved to http://apps2fusion.com

Smart Descriptive Flexfields | Print |  E-mail
Written by Anil Passi   
Tuesday, 30 January 2007
In this article, I would like to explain some tricks with context sensitive Descriptive Flexfields. To begin with lets consider some scenarios as below.

Scenario 1
. Depending upon the responsibility user has logged into, you wish to either show two flexfield segemts or three segments. This is a fairly common requirement.
Scenario 2. There are two different oracle screens, both based on same table but different functionality. Hence the share the same descriptiveflexfields. You wish to use notation :block.fieldname in the value set. But this will work in one screen and error in another.

Can't we simply use context sensitive flexfields?
You certainly can. However, what if you do not want to make your user select the value in context field manually? In this case you need to take your design a step further.
In fact, before you proceed further with this article, you must read this link Basic Concepts of Context Sensitive Descriptive Flexfields.
In case you do not know much about profile options, you must also read link basic concepts of Profile Options

What are the options at hand for solutions to Scenatio 1 and Scenario 2?
Option 1. Use profile option as the context
Option 2. Use a system global variable as the context.

How does this work?
In case of using profile option, value in Context Reference Field of the descriptive flexfield will be the profile option[see picture below].
Lets say for Responsibility-1 this profile is set to XX, and for Responsibility-2 this profile is set to YY, and for a special user this profile is set to value ZZ.

You can then define three different contexts, as below.
Context XX
  Uses attribute1 and attribute2, using value sets vs1 and vs2
Context YY
  Uses attribute 1, using value set vs3
Context ZZ
  Uses attribute2 with value set vs4 , making this descriptive flexfield segment mandatory.

Depending upon which responsibility user logs into, and also depending upon which user logs into the screen, they will see different flexfield segments popping up.

Ah, what if same user in a single responsibility has access to different screens that share same DFF?

In this scenario, you can design your descriptive flexfield on a System variable context. Hence your context will be :SYSTEM.CURRENT_FORM. Depending upon which form the user has navigated to, they will see different segments.

Note: Use Examine utility to find out the Current Form Name

Sounds good, but what are the pitfalls?
1. :blockname.fieldname convention does not works for OA Framework screens.
2. There is only one context reference field available per Descriptive Flexfield. If you choose to have your DFF context sensitive on a profile option, then you will have to live with it forever(ah should I say fusion-when D2K forms are gone). However this limitation can be overcome by using fnd_profile.put api, to alter the profile option value at runtime for forms session. Effectively you can modify the context[by changing profile option value pragmatically], using formspersonalizations.

How about OA Framework? Do we need these design methodology in OA Framework too?
Not really, because in OA Framework, you can use personalizations to decide which Context + Attribute combination must be displayed. Personalizations can be performed at responsibility level to get the desired result as discussed in example above.

Comments (13)add
written by emmanuel , January 31, 2007
Hi Anil,
I really appreciate your site. Its very educational. Thanks for the info. I am doing some thing along the DFF lines. When we query Address DFF in Receivables, I am trying to add my custom valuesets for the code AS_DEFAULT segments for City, State, County and Postal Code. When i choose Postal code based on that other columns needs to be populated. Is it possible. If so can you give me an idea. Appreciate your feedback. And Thanks in advance.
Best Regards,
written by Kishore Ryali , March 27, 2007
Hi Anil
I have a doubt regarding how to change the context using custom.pll or form personalisation?

Since the context is not defined as a field in the form, u cannot identify the context field just by saying :block.field_name
If it is the case, we cannot populate a value into context field using custom.pll or form personalization.

then how do we achieve the above?

Kishore Ryali
written by Anil Passi , March 28, 2007
Hi Kishore

Assuming you have context sensitive DFF, if context is not based on field, then it will be based either on Profile option or on global variable.

You can use forms customization to call fnd_profile.set for changing profile value for your current session and see if DFF responds to the dynamic change in context value.

written by Kishore Ryali , March 29, 2007
Hi Anil
thnx for the reply

so if the context is dependent on profile or global variable, we have to use tht profile in context reference field and populate the profile value programmatically using custom.pll/fp.

thnx again.

written by Prasad Kotha , April 18, 2007
The Invoice Line Information DFF is used in AR Transactions Form and AR Credit Transactions form. I need to set a Reference Field of BATCH_SOURCE name in both the Forms. How can I achieve this?

written by Neerja Dhillon , August 16, 2007

I recently came across your blog and am very impressed with the work you are doing. Thanks for taking the time to share your knowledge with others in such detail.

Below is my issue:

'PO Distributions' DFF is used by both PO Entry/'POXPOEPO' and PO Summary/POXPOVPO (View Only) forms.
Two of the PO Distribution DFF Segments have a Value Set with :Block.field reference. The value set uses the :block.field as seen in the PO Entry Form (block name is different on PO Summary Distributions Form). PO Entry forms PO Distributions are not an issue. However, there is an error when accessing PO Distributions from the PO Summary form. The error is due to the :block.field reference on the value set where clause.

I read above to use :SYSTEM.CURRENT_FORM as a reference field. I tried that but the forms are still accessing the Global Data Elements Segments. Below is what I did:

Context Field Values
Global Data Elements (original defintion)
POXPOEPO (defined two segments attribute 1 and 2 with the value set with :block.field reference.)
POXPOVPO (defined two segments without Value Sets since this is a view only form)

What am I doing wrong and how do I make this work?

Any help would be appreciated.

How to hide context in DFF
written by som , October 23, 2007
Business requirement:

FND Lookup Form - Common Lookups
The DFF in Lookup Values has 2 contexts, freight and ship method.
User Query for Lookup Type = Carrier.
DFF should show both the contexts so that user may set or unset the values for any context value.

NOW: User queries Ship_Method
DFF should not show the context Freight. It should only show "Ship_Method"

Is it possible to hide Contexts in DFF?


written by Anil Passi , October 23, 2007
Hi Som

The Display Context checkbox can be unchecked to hide the context field.
However, if context is being displayed, then there is no way for you to display selective Context values Only

I suggest you register the lookup type itself as a context reference
See below image

Anil Passi
Using Profile Option as context Images not visible
written by Sumeru Dhimbale , October 25, 2007
Hi Anil,
Could you please explain how can I use profile option as context field for a DFF.
I think you have done it already but unfortunately images are not visible on this page so I think I cannot see corressponding screenshot.

Thanks buddy , you are of great help, keep up the good work.

:block.field reference giving error in copy order lines and mass change
written by Nilesh Goyal , November 06, 2007
Hi Anil,

When I try to copy order lines to an existing order or do mass change in the order lines I get the following error:
The flexfield on this field contains a flexfield bind variable with a :BLOCK.FIELD reference. This prohibits operation in the mode that optimizes performance over a
wide-area network.To continue using this form, have the system administrator either remove all :BLOCK.FIELD references, or turn off wide area operation by setting the profile option - Flexfields: Validate on Server to N. The reference may be in a WHERE_CLAUSE token passed into the flexfield definition in the form, a WHERE clause in a table-validated value set, or a default value for one of the segments of this flexfield.

I checked the value of Flexfields: Validate on Server -> it is set to N

Navigation for copy order:
open the sales order form--> query on an order -- > go to lines -- >click on actions -->click on copy--> to existing
order (put an existing order number)-- >click ok
Navigation for mass change:
open the sales order form--> query on an order -- > go to lines --> to to edit menu--> click select all --> click on tools--> click on mass change --
>mass change form comes up -- > click on the DFF on the mass change form -- > enter values in few segments -- >click ok

I have :block.field reference at two places in sales order dffs
a)header additional information dff definition - context field (reference field) as smilies/shocked.gifrder.context
b)in the context values, some segments had default value as some value from smilies/shocked.gifrder.freight_term_code or value set had a field in where clause as smilies/shocked.gifrder.creation_date
c)similarly to b, lines dff had segments refering to :block.field values

a) for the header dff- replaced the reference field with a global variable (which i instantiated in the new form instance and assigned a value to it in the new item instance of header dff
b and c) did same as for a) above

a) Now Iam able to copy the order when I do copy headers and copy lines or copy to a new order in the copy tab (actions button) but when I try to copy it to the existing order it shows the :block.field error
b) similarly in mass change form iam getting this error

Can you pls help?

Context fields in Concurrent Request Form
written by Justin , March 01, 2008
hi anil,
can we have context fields in the concurrent request parameter form, so that we can dynamically include or exclude parameters.

written by Anil Passi , March 01, 2008
Hi Justin

Not really, thats not possible.
However, you can make one valueset dependent upon value in other.
Hence Parameters can have inter-dependency of their values

DFF fields to be dynamicaly displayed
written by sanjay jha , March 06, 2008
Hi I have requirement that the next DFF field should be displayed or not displayed depending upon the value entered in previous field , how can we achieve this .
Please guide .
You must be logged in to a comment. Please register if you do not have an account yet.