• No results found

Aliasing A Segment Value To Set The Attribute Category

3.13 Adding the Details Page DFF Segments to the Timecard matrix

3.13.2 Aliasing A Segment Value To Set The Attribute Category

If the DFF context definition includes a choice list component, and the timecard layout has no custom LOV included, then the least obvious option for setting the attribute category is to use an OTL Alternate Name on one choice list segment. This ensures that when the alternate name is resolved by the timecard deposit code, the attribute category and the appropriate segment value are set properly.

To do this, execute the following steps:

A Navigate to Application Developer Responsibility - DFF segments form - Query for ’Expenditure Items’ DFF under Projects Application, and create e.g. ’PA DFF ALTERNATE NAME’ context. This context will be used to generate the values in the alternate name definition form. Create at least two segments, with names, e.g.:

(a) DFF Segment Value (this will hold the actual value the user would have entered on the details page) (b) DFF Attribute Category (this will be the ’GLOBAL’ for example)

You can include an identifier segment if any of the alias values are duplicates. Make sure the DFF Segment Value segment has the same value set as the corresponding segment in the PA Expenditure Items Flexfield definition. This will ensure that you create only value alias values.

For the DFF Attribute Category segment, open the segment definition form and enter the default type of ’Constant’ and the default value of ’GLOBAL’ (or whatever you want the attribute category to be) - this avoids the need to type in the values in the alias definition page. Note: the alternate name translation engine adds the ’PAEXPITDFF - ’ prefix, so you should not include this in the segment or alternate value definitions.

Make sure both segments are required. Freeze the flexfield definition and save your work.

B Navigate to the Alternate Name Mapping form under an OTL Application Developer responsibility. Enter ’OTL Alternate Name DFF Context’ against value set/context, and then the context you created in step A, e.g. PA DFF ALTERNATE NAME’. Click in the lower block (under Attribute/Column Name) and the segments you created as part of this context will be auto populated.

Against the DFF segment value column choose the dummy paexpitdff mapping component corresponding to the segment for this segment, e.g. if you’re storing the segment value in attribute 5 in the PA DFF definition, pick mapping component: ’PADFFAttribute5’. **NOTE** this is not necessarily the same as the segment you chose in step A to support this value in the alternate name attribute. Typically you’d pick attribute1 for the segment value in the OTL Alternate Name attribute - this mapping component tells the OTL Alternate Name translation engine where to put the value in the real (PAEXPITDFF) attribute.

Against the DFF attribute category segment choose the mapping component: ’Dummy Paexpitdff Context’ Save your work.

C Next navigate to the Alternate Name Definition form, under the same responsibility. Provide some name for your alias definition, and then pick the context name you created in step A against the ’Type Name’ field. The ’Prompt’ field isn’t used on the self service timecard, but it is a good idea to fill this in anyway for reuse with timekeeper, provide some prompt, typically the same as the segment prompt in the PA definition, e.g. ’Activity’. Save your work.

Now, for each value you want the users to be able to pick for this segment value, create an alternate name entry against this alternate name definition, e.g. Alternate Name: ’Bicycling’ Date From: ’01-JAN-2000’ Date To: ¡null¿ Values (flex window opens) Segment Value: ’Bicycling’ Segment Context ’GLOBAL’. Make sure the alternate name definitions are enabled. Again, recall that the alternate name translation engine adds the required ’PAEXPITDFF - ’ prefix automatically on deposit, so this should not be included in the alternate name value definition.

Save your work.

D Now in the layout definition create the segment entry as the aliased value, e.g. as: BEGIN HXC LAYOUT COMPONENTS

"Projects Timecard Layout - Alternate Name DFF Activity" OWNER = "ORACLE"

COMPONENT VALUE = "DFFALTNAMEACTIVITY" SEQUENCE = "260"

COMPONENT DEFINITION = "CHOICE LIST" RENDER TYPE = "WEB"

PARENT COMPONENT =

"Projects Timecard Layout - Day Scope Building blocks for worker timecard matrix" LAST UPDATE DATE = "2004/05/24"

BEGIN HXC LAYOUT COMP QUALIFIERS

"Projects Timecard Layout - DFF Attribute Category" OWNER = "ORACLE"

QUALIFIER ATTRIBUTE CATEGORY = "CHOICE LIST" QUALIFIER ATTRIBUTE1 = "Custom1VO"

QUALIFIER ATTRIBUTE4 = "N" QUALIFIER ATTRIBUTE10 =

QUALIFIER ATTRIBUTE17 = "NONE" QUALIFIER ATTRIBUTE20 = "N" QUALIFIER ATTRIBUTE21 = "Y" QUALIFIER ATTRIBUTE22 = "L"

QUALIFIER ATTRIBUTE24 = "PA DFF ALTERNATE NAME" QUALIFIER ATTRIBUTE25 = "FLEX"

QUALIFIER ATTRIBUTE26 = "OTL ALIAS 1" QUALIFIER ATTRIBUTE27 = "Attribute1" LAST UPDATE DATE = "2004/05/24" END HXC LAYOUT COMP QUALIFIERS END HXC LAYOUT COMPONENTS

Note: It is very important to use Attribute1 and OTL ALIAS 1 in qualifier attribute 27 and 26, respectively. Also, you must specify the OTL Alternate Name context you created in Step A in qualifier attribute 24, or the alternate name translation engine can not work correctly.

E Add the supporting view. The choice list must fetch the alias values into the middle tier somehow, and it does this via the Custom1VO specified above. The supporting view definition would appear:

create or replace force view HXC CUI CUSTOM1 V (display value,

value) as

(select tl.alias value name, b.alias value id

from hxc alias values tl tl, hxc alias values b,

hxc alias definitions ad

where tl.language = userenv(’LANG’) and tl.alias value id = b.alias value id

and b.alias definition id = ad.alias definition id

and ad.alias definition name = <Alternate Name Definition> )

/

Where Alternate Name Definition is replaced with the quoted name provided for the alternate name definition in step C above. This view ensures the right values are shown in the choice list.

F Next create a preference node and resource rule, attaching the alternate name definition to the ’Timecard Alternate Names’ preference. If using more than one alternate name, ensure that the number of the ’OTL ALIAS n’ context specified in the layout definition, matches the Timecard Alternate Name number in the preference. I.e. if in the layout you specified ’OTL ALIAS 3’ because 1 and 2 were used in the layout already, ensure this preference has the right values for alternate name 1 and 2, and the new PA DFF Alternate name is associated with the Timecard Alternate Name 3 segment. Also, create a preference node under the same parent node, and attach the layout definition containing the PA DFF components in the main timecard matrix - then associate the parent node containing both preferences to the user population via the appropriate preference resource rule. Once these six steps are complete, and the layout is uploaded the PA DFF segments will appear in the timecard matrix and will be populated correctly in the database.