Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Tabular Form: Icon Link Column in f08

Fractal65Jan 16 2015 — edited Jan 29 2015

Hello, I am working with a Tabular Form column that needs to display an icon which launches a Javascript function and passes the row value into it. The function launches a popUp2 window which sets the values of other fields on that row. So the row number is crucial, but it is always 0 for newly-created rows (in APEX 4.0.0.00.46). I managed to solve that problem by storing the rowNum of new rows into my Updated By column during AddRow. See the end of this post for more on that.

What I have now is an Updated By column ("Lookup" Heading) which stores the row number of new rows, has onClick="javascript:usePopup(this);" in the Element Attributes which launches the popUp window function, and then gets any values under 2 digits wiped before submit. This fills the correct fields and submits to the table with no problem.

function usePopup(uThis){
var nRow = uThis.id.substr(uThis.id.indexOf('_')+1); //gets the RowNum of existing rows
if(nRow == 0){
nRow = $v(uThis); //this is a brand-new row, with its rowNum stored in this value
}
popUp2('f?p=' + $v('pFlowId') + ':734:' + $v('pInstance') + '::::P734_NODE:'+nRow+'',550,300); //launches the window which sets the values of the tabular form

$('#f06_'+nRow).val('please use popup');
$('#f07_'+nRow).val('please use popup');

}

icon.png

I can't keep using the Updated By column for this function, though. There are currently reports running on this table, so I can't add a new column to the table. I need a dummy column to display the icon, temporarily store the Row Number of newly created rows, and not mess up the MRU. It is f08, so the value of f08_0005 needs to be 0005. I tried making a null column with

select

"FUEL_USAGE_DETAIL_ID", ...

"EXPENSE_TO_PROJECT",

"EXPENSE_TO_TASK",

NULL Lookup,

"UPDATED_BY",

"PROVIDER"

from "#OWNER#"."FUEL_USAGE_DETAIL"

but that can't submit. I get the Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "01A949FAF0B3A91914ACECCDC9BBA9E6", item checksum = "B6ADF86455B14EF691B2BFA314926A0D". I had unchecked the "show" option for Updated By (f09), so it is hidden here.

icon column.png

Please help me create a null column to display this icon, store the row number of all the rows (including the brand new rows), and not mess up the MRU. Thank you!

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 26 2015
Added on Jan 16 2015
5 comments
1,760 views