Change column to update on Tabular Form
Hello
I created a tabular form on a table and when creating it, I made one of the columns not updateable. Is there a way I can change the properties of this column to updateable without having to delete the tabular form and start again.
Regards
Craig
Hello
I created a tabular form on a table and when creating it, I made one of the columns not updateable. Is there a way I can change the properties of this column to updateable without having to delete the tabular form and start again.
Regards
Craig
Similar Messages
-
Column value substitution in tabular form element attributes
We started to discuss this at Re: Tabular form with Ajax
I also mentioned this at Re: how to make only some rows editable in html db.
but thought that this deserves its own thread.
In Doug's sample Sudoku application in that thread, he uses #COLUMN# substitution in the Form Element Attributes and it works fine, but in my example page at http://htmldb.oracle.com/pls/otn/f?p=24317:219 I used the same technique and no matter what I do, the #COLUMN# substitution is not expanded by the Apex engine.
This is driving me nuts, any ideas why it works in one application but not in another?
ThanksHm, you might be right.
I copied your row template and modified it at http://htmldb.oracle.com/pls/otn/f?p=24317:219
The styling looks terrible, not sure why, the template is simply
<tr>
<td class="t10data">#EMPNO_DISPLAY#</td>
<td class="t10data">#ENAME#</td>
<td class="t10data">#JOB#</td>
<td class="t10data">#MGR#</td>
<td class="t10data">#HIREDATE#</td>
<td class="t10data">#SAL#</td>
<td class="t10data">#COMM#</td>
<td class="t10data">#DEPTNO#</td>
</tr>I had a lot of trouble getting this to work because the wizard generated tabular form appends 2 hidden fields containing the PK and the row-checksum to the last (editable?) field on each row. If the last editable field has #COL# substitution, it expands the substitution and forgets to close the INPUT tag thus causing malformed HTML (I think this is a bug in the rendering engine).
The readonly condition is sal>1000 which now works. The SAL>1000 fields are now readonly.
But now the update process is broken. If I enter a number in the first blank SAL field (empno=3641) and click Submit, I get no errors but the change is not saved. Wonder why.
Hopefully, Scott (Spadafore) will take mercy on our amateurish experiments and give us some definitive answers soon!
Thanks. -
How to set a column value in a tabular form via button
Hi All,
I am using Apex 3.0.1. And to create the form I am using the APEX interface tool
I have tabular updateable report. In the same page I have a LOV field where I can choose some possible results.
I want to have a button so I can select a value in the LOV, take this value and populate the column value to the LOV value for all rows in the tabular form.
The LOV and the buttons are done.. to update the column I tried creating a pl/sql that is executed when the button is pressed and has the following update in a loop for each element:
begin
for i in 1..APEX_APPLICATION.g_f01.count loop
APEX_APPLICATION.G_F02(i) := :P1_MY_LOV_VALUE;
end loop;
commit;
end;
When I press the button, the page refreshes but nothing happens. I don't see any changes in the Values for the column I am trying to update
ThanksHi user477501,
If you are doing this after a SUBMIT, then try updating your data table instead of the g_f02 array. When you page is re-rendered, it should re-query your data table.
If you do not want to submit the page, then try your hand at JavaScript.
A good reference for this is Mike Hichwa's article at:
http://www.oracle.com/technology/oramag/oracle/06-nov/o66browser.html
Be sure to download the example application, it is very helpful.
I hope this helps.
Patrick -
Multi Row Update for Tabular Form
1) I'm trying to understand how the built-in MRU works for tabular forms: While running through every row, does it check for changes before issuing an UPDATE or does it blindly UPDATE every row in the current pagination range?
2) If I need to write my own Multi Row Update process for tabular forms, could someone give me some tips on how to do that?
Thanks,
Pavel1) It stored a checksum for each row that it renders. It calculates the checksum again before processing the rows. The UPDATE statement it issues has a predicate like where old_checksum!=new_checksumSo, it only updates the rows that have at least 1 column value that is different (causing the row checksum to be different)
2) See the howto at http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html -
How to identify rows to update on tabular form?
Application Express 3.2.1.00.10
Hello!
I have a tabular form in my application that I created through the wizard. The form is based on a table with a primary key and a trigger to populate the next key upon insert, so as a result going through the wizard was not a problem. It created page processes for ApplyMRU, ApplyMRD, AddRows, etc. I'm curious how APEX knows which row is updated without the user having to select the checkbox and clicking Submit. It seems the checkbox is only for cases where the user wants to delete a record.
I want to be able to replicate this in another tabular form page which I am manually creating, although it will be based on a view without a PK (which I had to "fake" by concatenating unique identifying columns). In this form page, when I make attempt to make an update to a record, nothing happens in the database, unless I actually check a checkbox and click on Submit. How do I get around having the user to click off records to update? I want the form to just accept changes, and "know" which records to update in the table, similar to how APEX does it out of the box.
Any ideas? Thanks!Denes,
I tried as you have suggested, but for some reason, it doesn't seem that any action is taking place. Either the column arrays are empty or apex_application.g_f01(i) does not have a value. I've verified that none of the records in the database have changed. Any ideas?
The Process Success Message is set to:
Changes successful. &P7_REC_UPDATE_COUNT. records updated. &P7_REC_INSERT_COUNT. records inserted. ... and it shows Changes successful. 0 records updated. 0 records inserted.
This is the Page Process executed on submit of the "Submit" button:
DECLARE
v_return NUMBER;
v_msgcode NUMBER;
v_message VARCHAR2(250);
v_row BINARY_INTEGER;
v_insert_cnt INTEGER := 0;
v_update_cnt INTEGER := 0;
BEGIN
FOR i IN 1..apex_application.g_f01.COUNT LOOP
IF apex_application.g_f10(i) IS NOT NULL -- CHECKSUM FIELD
AND wwv_flow_item.md5 (apex_application.g_f01(i), -- PK_COLUMNS
apex_application.g_f05(i), -- org_code
apex_application.g_f07(i), -- access_flag
apex_application.g_f08(i), -- external_flag
apex_application.g_f09(i) -- confid_ind
) != apex_application.g_f10(i)
THEN
ROLLBACK;
RAISE_APPLICATION_ERROR(-20001,'Current version of data in database has changed '||
'since user initiated update process.');
RETURN;
END IF;
END LOOP;
FOR i IN 1..apex_application.g_f01.COUNT LOOP
IF apex_application.g_f01(i) IS NOT NULL THEN
-- update existing record if PK value exists
USER_SEC_UPDATE (I_ACTION => 'U',
I_WK => apex_application.g_f02(i),
I_USER_ID => apex_application.g_f03(i),
I_ORG_CODE => apex_application.g_f05(i),
I_ACCESS_FLAG => apex_application.g_f07(i),
I_EXTERNAL_FLAG => apex_application.g_f08(i),
I_RPT_LEVEL => NULL,
I_CONFID_IND => apex_application.g_f09(i),
O_RETURN => v_return,
O_MSGCODE => v_msgcode,
O_MESSAGE => v_message);
v_update_cnt := v_update_cnt + 1;
ELSE
-- insert new record if PK value doesn't exist
USER_SEC_UPDATE (I_ACTION => 'I',
I_WK => NULL,
I_USER_ID => apex_application.g_f03(i),
I_ORG_CODE => apex_application.g_f05(i),
I_ACCESS_FLAG => apex_application.g_f07(i),
I_EXTERNAL_FLAG => apex_application.g_f08(i),
I_RPT_LEVEL => NULL,
I_CONFID_IND => apex_application.g_f09(i),
O_RETURN => v_return,
O_MSGCODE => v_msgcode,
O_MESSAGE => v_message);
v_insert_cnt := v_insert_cnt + 1;
END IF;
END LOOP;
:P7_REC_UPDATE_COUNT := v_update_cnt;
:P7_REC_INSERT_COUNT := v_insert_cnt;
END; -
Does anyone know a way of making primary keys updatable in tabular forms
Is there a way i can make my primary key updatable in a tabular form.
I have two tables one called proposal details and one called student current details. Bascially you select one of your proposal details to become your current project this is done via the proposal id. The problem is that i cannot make this field editable in a tabular form. Does anyone know how i could make this primary key updatable?Hi Dan,
One suggestion, perhaps, would be to base the tabular form on a View rather than directly off of the table. The view could include two instances of the proposal id field - the actual field and a second field called, say, PROPOSAL_ID_EDITABLE. You can then use an INSTEAD OF trigger on the view to update the actual table data with the value entered/selected in this second field.
The reason why Apex will stop you updating primary keys is that it needs to be able to use these to get back to the original record to apply any changes. If you use a view instead, ensure that the primary key fields are not editable but allow the user to change a dummy field instead, the pk fields are available for Apex to get back to the data but the trigger will change the value instead.
Regards
Andy -
Cannot perform insert/update on tabular form, because of dynamic action
Hello all,
I have created dynamic action which computes value from several tabular form cells.
This functionality works nice, when I change value in associated cell then the computed value is changed by the dynamic action.
But I am not able to insert or update the row in tabular form when the dynamic action is enabled. When I set condition to "Never", then the row is inserted or updated without any problems.
Any guess where is the problem?
Apex version: 4.1.1.00.23
JiriOk, below are details related to my DA. Sorry for the poor description in previous posts.
Triggered by: Chnage event
Selection type: jQuery Selector
jQuery Selector
td[headers='SPECIESCODE'] input,td[headers='MEASURETYPE'] input,td[headers='TRUNKLOGID'] input,td[headers='LOGCLASS'] input,td[headers='LENGTH'] input,td[headers='PIECES'] input,td[headers='DIAMETER'] inputTrue Actions:
*1.*
//get element id which was changed by user
var v_elementid = (jQuery(this.triggeringElement).attr('id'));
switch(v_elementid.substr(0,3))
case "f05":
//assign value from triggered element to hidden field
$s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).val());
//assign actual values also to other hidden elements
$s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
$s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
$s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
$s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val());
$s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val());
$s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
break;
case "f06":
$s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).val());
//assign actual values also to other hidden elements
$s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
$s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
$s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
$s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val());
$s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val());
$s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
break;
case "f07":
$s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).val());
//assign actual values also to other hidden elements
$s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
$s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
$s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
$s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val());
$s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val());
$s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
break;
}*2.*
//get element id which was changed by user
var v_elementid = (jQuery(this.triggeringElement).attr('id'));
switch(v_elementid.substr(0,3))
case "f09":
$s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).val());
//assign actual values also to other hidden elements
$s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
$s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
$s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
$s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val());
$s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val());
$s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
break;
case "f12":
$s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).val());
//assign actual values also to other hidden elements
$s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
$s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
$s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
$s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
$s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val());
$s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
break;
case "f13":
$s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).val());
//assign actual values also to other hidden elements
$s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
$s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
$s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
$s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val());
$s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
$s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
break;
case "f14":
$s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).val());
//assign actual values also to other hidden elements
$s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
$s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
$s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
$s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val());
$s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val());
$s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
break;
}*3.*
call PL/SQL function (values from hidden fields are used as input params)
begin
:P210_HIDDEN_VOLUME := function(:P210_HIDDEN_SPECIES,:P210_HIDDEN_MEASURE,:P210_HIDDEN_TRUNKLOGID,:P210_HIDDEN_LOGCLASS,:P210_HIDDEN_LENGTH,:P210_HIDDEN_DIAMETER,:P210_HIDDEN_PIECES, :G_USERLANG);
end;*4.*
here I want to set computed value from hidden field to VOLUME cell in tabular form. And it seems there is some problem, because not only the corresponding VOLUME cell is changed, but also several other cells. I realized that also several cells which are hidden to user has same value as computed VOLUME field. Including ROWID and then the insert/update operations are not done.
// find the VOLUME-Field and set it to the computed value
jQuery(this.triggeringElement).parents("tr:first").find("td[headers='VOLUME'] input").val($v("P210_HIDDEN_VOLUME"));I hope I have provide more information and somebody will be able to he help me. maybe the problem is clear, but with my poor jQuery knowledge i am not able to find it.
Thanks in advance!
-Jiri
Edited by: Jiri N. on Aug 10, 2012 3:24 AM -
How to update Manual Tabular Form
Hi There,
I have a manual tabular form on an apex 4.1 page and I would like to update the records when I click on a submit button.
Below is the query of the form:
SELECT '#ROWNUM#' sno,
apex_item.checkbox(01, wo_line_id) del,
apex_item.hidden(02,wo_line_id)||apex_item.hidden(03,wwv_flow_item.md5(adjusted_amount)) wo_line_id,
apex_item.text(17, adjusted_amount, 10, 10,'onchange="set_innerHTML(this);"','f17_' ||'#ROWNUM#') adjusted_amount
from work_order_lines
where wo_header_id = :P302_WO_HEADER_ID;
Below is the code in the "After Submit" process
DECLARE
v_header_result VARCHAR2(1);
v_line_result VARCHAR2(1);
v_error_count NUMBER:= 0;
BEGIN
FOR i in 1..apex_application.g_f02.COUNT
LOOP
BEGIN
update_wo_lines_prc(:APP_USER
,:P302_WO_HEADER_ID
,APEX_APPLICATION.G_F02(i)
,APEX_APPLICATION.G_F17(i)
,v_line_result);
END;
END LOOP;
COMMIT;
END;
Somehow the LOOP doesn't get executed.
Please advise.
Thanks
YogiHi,
I found the reason for this.
For the column wo_line_id the show option in the report attributes was not checked.
Thats why apex_application.g_f02.count is returning 0 and the loop was never executed.
Thanks
Yogi -
Change color multi-row highlite tabular form
I would like specific instructions on a quick way to change the highlite color when the multi-row check
box is chosen on a tabular form.
Thanks,
SabrinaSabrina,
To change the background color of the rows selected using the row selector, edit the report template youâre using, scroll down to row highlighting and type the color you like into the field labeled âBackground color for checked rowâ. You can type in the name of the color or the code.
Hope this helps,
Marc -
ORA-1779 during update on Tabular Form
Hi,
I have a view I created based on 4 tables. I have one table with a primary key which will be updated. All information is displayed on the form correctly. When I try to update 1 field it gives me a ora-1779 error which is related to a key preserved table issue.
Why is this doing this and what can I do to resolve it ? I read something about doing an instead of update trigger. Is that what I really want to do ? I am thinking there should be an easier way to fix this.
Thank you in advance for your time,
AnonHere is a listing of instead of trigger threads here in the forum..;[http://forums.oracle.com/forums/search.jspa?threadID=&q=instead+of+trigger&objID=f137&dateRange=all&userID=&numResults=15&rankBy=10001]
I believe your answer should be here..
Thank you,
Tony Miller
Webster, TX -
Save changes button not working in my tabular form
Hello,
I have created a tabular form with all the button like cancel,delete,save,add row and their processes by default
when i tried to run the report, the save is not working (whenever i tried to make some changes and update the form) like it giving me an error saying that
" Error in mru internal routine: ORA-20001: no data found in tabular form "
I looked at the process MRU, it is OKAY.
I tried to delete it(the MRU process) and created a new MRU process then also the SAVE button is not working, like it gives the same error.
" Error in mru internal routine: ORA-20001: no data found in tabular form "
Can anyone help me out with this issue...!
what might be the problem?There could be two reasons for this error:
1. in your MRU Process, you didn't type the proper primary key column name
2. your tabular form is missing the referenced collumn
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------------------ -
Dynamic Action On change tabular form question
Hi guys!
I've wanted to add dynamic action on change (tabular form) to execute PL/SQL which checks if column of the tabular form has changed and if yes it changes walue of text field to Y or N. It doesnt work...and I don't know why. If I create validation with this PL/SQL it works. Can you help?
DA:
On change - Tabular Form
PL/SQL;
DECLARE
nazwa VARCHAR2(4000);
counter NUMBER := 0;
BEGIN
FOR i IN 1 .. apex_application.g_f08.COUNT
LOOP
SELECT NAZWISKO INTO nazwa FROM SPR_META.M_UZYTKOWNICY WHERE NAZWA_UZYTKOWNIKA = apex_application.g_f02(i);
IF wwv_flow_item.md5(nazwa) <> wwv_flow_item.md5(apex_application.g_f08(i)) THEN
counter := counter + 1;
END IF;
END LOOP;
IF counter > 0 THEN
:P5_IS_TABULAR_FORM_CHANGED := 'Y';
ELSE
:P5_IS_TABULAR_FORM_CHANGED := 'N';
END IF;
END;Page items to submit: P5_IS_TABULAR_FORM_CHANGE
What's wrong?
With regards,
PsmakRRegion static id shouldn be in bracketsYou missed the '#' informt of the region id.
why my original PL/SQL process did not work
FOR i IN 1 .. apex_application.g_f08.COUNTThis works only when the application array has values and that happens only when the page is submitted.When you submit the dynamic action , it isn't.
This script combined with script to detect changes makes apex page running very slowIf you use that PLSQL code(assuming it works as expected) , then its going to take a server request every-time you change a field in the tabular form and loop though all the array values(if they would be submitted before) and recalculate and compare the checksums . Isn't that going to be very inefficient.
As for that JS code, it only runs at the client side. You can do all the server side checks on submit, when the user expects some delay due to processing. -
Not null and enable or disable column in tabular form
Hi,
Using apex version 4.1 and working on tabular form.
ACT_COA_SEGMENT_MAS is Master table
and
ACT_SEGMENT_VALUES_MAS is detail table
I have entered 8 rows in master table and PARENT_SEGMENT_ID is column in master table which is null able. If i specified PARENT_SEGMENT_ID with value in master table then in detail table there is column PARENT_ID that should not be null and enable.
How i can enable or disable column when in master table PARENT_SEGMENT_ID column is null then in detail table PARENT_ID column should disable and vice versa.
I have created tabular form on Detail table. before insert into the tabular form Check in master table in first entry if PARENT_SEGMENT_ID is not null in first row of master table then in tabular form PARENT_ID should enable and not null able in corresponding to this first row id's lines in tabular form.
Same should check for second row in master table if PARENT_SEGMENT_ID is not null then entered rows with PARENT_ID into tabular form corresponding to 2nd id in master table should not nullable and column should enable in tabular form.
Thanks & Regards
Vedant
Edited by: Vedant on Jan 9, 2013 9:12 PMVedant,
You need to create you own manual tabular form and not use the wizard.
Using APEX_ITEM api you should be build you own form and you will be able to control how you wan to display the rows. (See Link [Apex Item Help|http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE] )
select case when PRIMARY_TABLE_COLUMN is null then APEX_ITEM.DISPLAY_AND_SAVE(3 , DETAIL_COLUMN ) else APEX_ITEM.TEXT(2,detail_column) end "ALIAS" from detail table
Hope that help.
Vivek -
Column Link is not working on a Manual Tabular Form
Hello,
I am having some issues creating a link on a column based on a manual tabular form (I am using Apex 4.1.1.00.27, Oracle DB 10.2.0.5.0):
On my page 1, I created a process that deletes and creates a collection based on the “emp” table; then, I have a manual tabular form based on that collection; and finally, a link on the “deptno” column of the manual tabular form that points to my Page 2 (department form) and it’s passing the parameter P2_DEPTNO:#DEPTNO#.
The problem is that when I press the link, the page is not submitting the DEPTNO value. Also, I notice that as soon as I specify the column as a link column, it does not show the value in my tabular form, but if I remove the link, it shows the value correctly.
I created an example on apex.oracle.com in case some of you want to look into it:
Workspace: EDIAZJORGE
Username: test
Password: test123
App Name: Sample App
App Number: 12231
I appreciate any ideas or suggestions on how to solve this issue.
Thank you,
ErickHello,
Try following code
SELECT APEX_ITEM.HIDDEN(1,C001) EMPNO,
APEX_ITEM.TEXT(2,C002) ENAME,
APEX_ITEM.TEXT(3,C003) JOB,
APEX_ITEM.TEXT(4,C004) MGR,
APEX_ITEM.TEXT(5,C005) HIREDATE,
APEX_ITEM.TEXT(6,C006) SAL,
APEX_ITEM.TEXT(7,C007) COMM,
'<a href="f?p=&APP_ID.:2:&APP_SESSION.:::2:P2_DEPTNO:'||C008||'"><img src="/i/ws/small_page.gif"></a>' DEPTNO
FROM APEX_COLLECTIONS
WHERE COLLECTION_NAME = 'EMP_COLLECTION'
UNION ALL
SELECT APEX_ITEM.HIDDEN(1,NULL) EMPNO,
APEX_ITEM.TEXT(2,NULL) ENAME,
APEX_ITEM.TEXT(3,NULL) JOB,
APEX_ITEM.TEXT(4,NULL) MGR,
APEX_ITEM.TEXT(5,NULL) HIREDATE,
APEX_ITEM.TEXT(6,NULL) SAL,
APEX_ITEM.TEXT(7,NULL) COMM,
APEX_ITEM.TEXT(8,NULL) DEPTNO
FROM DUALFor existing data, it will display as link and for new data, it will still display as text box.
Please note that you should display DEPTNO as standard column and not as LINK.
Regards,
Hari
Escaped < in tags :) -
Detail tabular form based on two tables
db11gxe , apex 4.0 , firefox 24 ,
hi all ,
i have a master detail form based on two tables , the detail form ofcourse based on one table , the problem is i want to include a column of another
table into the tabular form , so i have changed the query of the tabular form and included the column in it correctly ,
but the problem is about saving data , i can not save the data , i think
because the "mru" process is based on one table , that is because i face an error talking about "mru" process when i try to save the data ,
Error in mru internal routine: ORA-20001: no data found in tabular form Unable to process update.
so
what should i do to save the data ? should i create another "mru" process based on the other table or what ?
thanksAnything beyond "simple" requires that you do it yourself. I believe that what you want is "beyond simple"
As far as I know, you can only use the 'mru' on one table.
(I could be wrong)
If the conditions are right, you might be able to simplify things such that you can use the 'mru'.
ie CREATE VIEW on the two tables.
However, you need to understand how Oracle treats DML operations on views, what type of views can be updated, etc., etc.
If just creating the view doesn't work, creating an INSTEAD OF trigger on the view come to mind...
(lol) - at that point, you have already started down the 'dark path' of creating your own 'MRU'
personal note: triggers have a really baaaddd habit of hiding code from other developers. you are better off, in the long run, creating your own 'mru'..
ie a package with procedures to handle INSERT, UPDATE, and DELETES
MK
Maybe you are looking for
-
Cannot send email using gmail account
Within the last month or so, sending mail from my gmail id in Thunderbird fails. Receiving works fine. I'm running windows 7 on a desktop. Status says - 'connected to smtp.gmail.com...' Error message is - 'Sending of message failed. The message could
-
I need to create handling units by serial numbers in HUPAST
Hello Experts, I need to create handling unit by serial numbers instead of Batch Numbers. Please suggest me how we can do this. Thanks, Gaurav
-
Adobe will start up, and tell me how many pages are in document, then crashes.
I am using MAC 0S X 10.4.11. I cannot open any pdf files. I downloaded latest version of Reader, but it is still happening. Tried Adobe support, but they want $39. Any help would be greatly appreciated...
-
How to export images with transparent background in illustrator
H i I am trying to export a png, jpeg button design with curved designs. But the white background keeps appearing when exported. How do I remove the white background and just have the button image. Thank you.
-
Java.lang.IndexOutOfBoundsException during InvokeApplicationPhase
Hello, I'm developing JSF 1.1_01 application and during page submit have this stack trace: [04.12.15 10.26.43:875 EET] 554fd8f WebGroup E SRVE0026E: [Servlet Error]-[Index: 0, Size: 0]: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at j