Timecard Layout Modification – Adding Text Field
In this article, we will see how to add a Project Name column and comments in a column in the Project Timecard Layout.
If we observe the Oracle standard layout for Projects we don’t see any project name column in the Layout. So as part of this exercise, we will try to add the Project Name column.
As soon as we select the project number in the timecard page it should automatically pull the Project Name information based on the selected project number.
If we look at the timecard card layout header section we could see the comments section and we will try to add the similar comments section to each entry/line next to the timecard matrix.
Project Name
Oracle seeded template Projects Timecard Layout do not have the project name column by default. Unlike other custom columns, we don’t need to create new DFF context and segments.
In the timecard page, AK region HXC_CUI_TIMECARD is having the project name already.
Navigation: Ak Html Forms -> AK Regions -> Serch for HXC_CUI_TIMECARD -> click on hyperlink of HXC_CUI_TIMECARD
Now we have incorporated this column in the Projects Timecard Layout, we have to download the .ldt from Oracle server.
FNDLOAD apps/apps 0 Y DOWNLOAD $HXC_TOP/patch/115/import/hxclaytlayoutsld.lct xxcus_hxclaytlayoutsld.ldt HXC_LAYOUTS LAYOUT_NAME='PROJECTS-TIMECARD'
Open the .ldt(xxcus_hxclaytlayoutsld.ldt) file and rename it.
Add the below code in .ldt(xxcus_hxclaytlayoutsld.ldt) file.
############################################################################ # Project Name on the timecard matrix ############################################################################ BEGIN HXC_LAYOUT_COMPONENTS "XXCUS Projects Timecard Layout - Project Name" OWNER = "CUSTOM" COMPONENT_VALUE = "PROJECTNAME" SEQUENCE = "215" COMPONENT_DEFINITION = "TEXT_FIELD" RENDER_TYPE = "WEB" PARENT_COMPONENT = "XXCUS Projects Timecard Layout - Day Scope Building blocks for worker timecard matrix" REGION_CODE = "HXC_CUI_TIMECARD" REGION_CODE_APP_SHORT_NAME = "HXC" ATTRIBUTE_CODE = "HXC_TIMECARD_PROJNAME" ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC" BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXCUS Projects Timecard Layout - Project Name" OWNER = "CUSTOM" QUALIFIER_ATTRIBUTE_CATEGORY = "TEXT_FIELD" QUALIFIER_ATTRIBUTE1 = "N" QUALIFIER_ATTRIBUTE2 = "NODISPLAYCACHE" QUALIFIER_ATTRIBUTE2 = "N" QUALIFIER_ATTRIBUTE3 = "20" QUALIFIER_ATTRIBUTE4 = "1" QUALIFIER_ATTRIBUTE6 = "OraTableCellText" QUALIFIER_ATTRIBUTE7 = "OraTableCellText" QUALIFIER_ATTRIBUTE17 = "OraTableCellText" QUALIFIER_ATTRIBUTE20 = "N" QUALIFIER_ATTRIBUTE21 = "Y" QUALIFIER_ATTRIBUTE22 = "L" QUALIFIER_ATTRIBUTE25 = "FLEX" QUALIFIER_ATTRIBUTE26 = "PROJECTS" QUALIFIER_ATTRIBUTE27 = "Attribute20" QUALIFIER_ATTRIBUTE28 = "PROJECTNAME" QUALIFIER_ATTRIBUTE30 = "Y" END HXC_LAYOUT_COMP_QUALIFIERS END HXC_LAYOUT_COMPONENTS
The above code is for adding the project name in the Timecard page matrix and our requirement is to auto populate the Project Name column based Project Number selected.
To achieve auto populate value we have to slightly modify the Project Number column code in the .ldt file.
Now upload .ldt file to Oracle server and go to the timecard page and start entering the time entries.
FNDLOAD apps/apps 0 Y UPLOAD $HXC_TOP/patch/115/import/hxclaytlayoutsld.lct xxcus_hxclaytlayoutsld.ldt
If we would like to add the project name in Review Layout, Confirm Layout, Submit Layout and Recent timecard Layout. Download .ldt files from Oracle server and add the above project name custom script to those layouts.