Custom Tabular Form addRow function
Hi All
There appears to be a lot of people discussing this on the forum, but so far, I haven't been able to find a solution.
I have a custom tabular form and I need to add and Add Row button to create multiple blank rows without submitting the page. I have previously used a solution devised by Duncs many moons ago, that basically clones a row.
http://djmein.blogspot.co.uk/2007/12/add-delete-row-from-sql-based-tabular.html
Unfortunately, this basic method doesnt work for popup_lov apex items, nor will it increment ID numbers.
Ideally I would like to be able to use the addRow function that is used for a Tabular Form built using the Wizards; however, that function uses a ghost row as described in this forum thread:
"Ghost row" in 4.0 Tabular forms has id pattern f0x_0000
If it were possible to replicate that ghost row in a custom tabular form, then I guess that it would be possible to use the apex addRow function out of the box!?
Before I start re-inventing the wheel, has anone aready done this, or can you point me in the right direction please.
I hope that makes sense :)
Shunt
I'm using Apex 4.02 11g and will be upgrading to 4.2 in the near future; woohoo.
Thanks Daniel for your reply.
Actually its an interface with a custom tabular form on page 1 with apex collections and rich text editor on page 2. Since it is not possible to have the rich text editor, I need to have it in another page (I could have it the same page, that is the way I am trying now) however I open the next page as a modal window.
I have a link on the tabular form, so that the clob content is opened in the rich text editor on the next page. After the edit, I update it to the same collection and go back to the tabular form page and refreshes the report. It works fine, but causes trouble to the data entered on the other columns in the custom tabular form.
I have now deviated to another work and put this on a hold. If my explanation is still not clear, I will create the same page in apex.com to simulate the error.
Thanks again.
Natarajan
Edited by: Nattu on Mar 14, 2012 11:35 PM
Similar Messages
-
Java script is not working in custom tabular form
hai all,
i have changed my built in tabular form to custom tabular form.my java script is coding working fine in built in tabular form . But in my custom tabular form java script is not working ,since it is created as standard report(Display As).
pls help me.
with thanks and regards
sivakumar.GIs the appostrophe function test(pthis) *'* present in your javascript code...
If not can you post the same in apex.oracle.com and give the credential so that I can the why its not wroking
Regards,
Shijesh -
Custom tabular form error on apex_item id larger than 50
First post :)
I'd like to share a potential bug in apex (3.0.1) or misconfiguration in our application server
When creating a page with a custom tabular form, i've noticed that when i give a column an id over 50 (ex: "apex_item.text(51,salary) salary")
the page will generate errors in the apache.
The apache error log states the parameter F51 as incoming but it contains no value.
Further allong the log states:
"VARIABLES IN FORM NOT IN PROCEDURE: F51"
example report query:
select apex_item.hidden(1,"ID")||apex_item.checkbox(2,"ID") delete_checkbox
,apex_item.text(3,name) name
,apex_item.text(51,salary) salary
from employee;
I've always been under the impression that we could use F01 till F99?
Is there anyone who has encountered this problem before, or are my conclusions wrong?
Looking forward to an answer!
NikoHi Niko and Roel
Roel, you are right, I am hitting the 50 columns only limit too. Do you know of any ways to overcome this limit?
This post also describes the problem: Re: column in tabular form
Currently I need to create a tabular form to edit a table with 84 columns.
It sounds ugly, but this is a spreadsheet and the requirement is to get it in Oracle Apex 'as it is' and still, be able to edit it using MRU.
Any ideas?
Thank you very much.
Kubilay
Edited by: Kubilay on Jun 15, 2009 10:29 AM
Edited by: Kublai-Khan on Jun 15, 2009 10:30 AM -
Custom tabular form for multi-row not saving data
Ok, before anyone asks, yes, I did read the how-to:-)
I have a custom tabular form, which I did cause I need to use popups and the popups that you can use in the wizard tabular form does not display the text but rather the value underneath it.
It returns data rather nicely and when I go and update values I can tell it is changing the fields underneath. I put a process in that will display the values in text fields on the form (for one row only) and I see them changing from what is already there and with the proper values.
However, when I do that the data that is displayed then gets reverted back to what it was previous to the update but reports that the process was successful.
I have also tried to insert but that is basically doing the same thing. Can anyone guide me.
SQL to generate the tablular form...
SELECT x.sak_release_db
, x.sak_object
, x.sak_release
, x.sak_participant
, x.sak_csr
FROM
(SELECT htmldb_item.hidden(1,sak_release_db) sak_release_db
, htmldb_item.popupkey_from_query(2, sak_object,
'SELECT b.nam_schema||''.''||a.nam_technical as table_name , b.sak_object
FROM system_object a
, database_table b
WHERE a.sak_object = b.sak_object') as sak_object
, htmldb_item.hidden(4,sak_release) sak_release
, htmldb_item.popupkey_from_query(5, sak_participant,
'SELECT nam_first || '' '' || nam_last as name, sak_participant FROM co_participant') sak_participant
, htmldb_item.popupkey_from_query(7, sak_csr,
'SELECT external_id|| ''-''||id_split as co, sak_csr FROM co') sak_csr
FROM release_db_xref
UNION ALL
SELECT htmldb_item.hidden(1,NULL) sak_release_db
, htmldb_item.popupkey_from_query(2, NULL,
'SELECT b.nam_schema||''.''||a.nam_technical as table_name , b.sak_object
FROM system_object a
, database_table b
WHERE a.sak_object = b.sak_object') as sak_object
, htmldb_item.hidden(4,NULL) sak_release
, htmldb_item.popupkey_from_query(5, NULL,
'SELECT nam_first || '' '' || nam_last as name, sak_participant FROM co_participant') sak_participant
, htmldb_item.popupkey_from_query(7, NULL,
'SELECT external_id|| ''-''||id_split as co, sak_csr FROM co') sak_csr
FROM dual) x
Process to verify that I have the correct global fields: (Type: PL/SQL anonymous block, Process Point: On Submit - After Computations and Validations)
begin
:P3_2 := replace(htmldb_application.g_f02(1),'%'||'null%',NULL);
:P3_5 := replace(htmldb_application.g_f05(1),'%'||'null%',NULL);
:P3_7 := replace(htmldb_application.g_f07(1),'%'||'null%',NULL);
end;
Process to do the insert/update. Note, I hardcoded the value in the where clause but I was originally using the global value for g_f01 (i also tried putting a commit in there for fun) (Type: PL/SQL anonymous block, Process Point: On Submit - After Computations and Validations):
-- Update the RELEASE_DB_XREF table
FOR i IN 1..htmldb_application.g_f01.count
LOOP
IF htmldb_application.g_f01(i) IS NOT NULL THEN
UPDATE release_db_xref
SET sak_object = replace(htmldb_application.g_f02(i),'%'||'null%',NULL)
, sak_participant = replace(htmldb_application.g_f05(i),'%'||'null%',NULL)
, sak_csr = replace(htmldb_application.g_f07(i),'%'||'null%',NULL)
WHERE sak_release_db = 22;
ELSE
IF htmldb_application.g_f02(i) IS NOT NULL THEN
INSERT INTO release_db_xref
(sak_object
,sak_release
,sak_participant
,sak_csr)
VALUES
(replace(htmldb_application.g_f02(i),'%'||'null%',NULL)
,htmldb_application.g_f04(i)
,replace(htmldb_application.g_f05(i),'%'||'null%',NULL)
,replace(htmldb_application.g_f07(i),'%'||'null%',NULL));
END IF;
END IF;
END LOOP;Florian,
Checkboxes are different from other HTML form items. When you have a text box for example, there's always a value send to the server when submitting. Even if that value is NULL. When you have a checkbox however, you only get the value if the checkbox is checked. It's not posted to the server when it is not checked. That's the general behavior of HTML forms and not specific to Oracle HTML DB.
When working with tabular forms in HTML DB, you can access your form values using the htmldb_application.g_f0x arrays. Now if you have for example 10 rows in your form, then you'll get ten elements in your array for text boxes, select lists, etc. For checkboxes however you'll only get as many elements as you have rows checked. If I read your update and insert code correctly, you're trying to use the checkbox arrays the same way you use the arrays based on other item types. My recommendation would be to use Yes/No select lists instead of checkboxes or at least use select lists initially to get it working and then work on properly processing the checkboxes.
Some general information about working with checkboxes in tabuar forms can be found here:
http://www.oracle.com/technology/products/database/htmldb/howtos/checkbox.html#CHECKBOX_IN_REPORT
Hope this helps,
Marc -
Custom Tabular form - Session state values disappear
Hi,
I have a custom tabular form page using apex_item and apex_collections. I am using the apex_collection to store the values in memory in order to avoid the data loss in session state. The page is working fine after a validation failure and it shows the values on the second report (as advised for custom tabular forms).
In this, some of the rows have clob value which needs to be edit on a rich text editor. Since apex_item does not provide a solution to have rich text editor, I have to branch to another page on an Edit link for the CLOB data using a modal window. However When I return back from the modal page, the values disappear from session state, and the validation (using htmldb_application.g_fxx arrays) does not take place.
Is there any workaround to overcome this issue?
Apex version: 4.1
Thanks in advance.
NatarajanThanks Daniel for your reply.
Actually its an interface with a custom tabular form on page 1 with apex collections and rich text editor on page 2. Since it is not possible to have the rich text editor, I need to have it in another page (I could have it the same page, that is the way I am trying now) however I open the next page as a modal window.
I have a link on the tabular form, so that the clob content is opened in the rich text editor on the next page. After the edit, I update it to the same collection and go back to the tabular form page and refreshes the report. It works fine, but causes trouble to the data entered on the other columns in the custom tabular form.
I have now deviated to another work and put this on a hold. If my explanation is still not clear, I will create the same page in apex.com to simulate the error.
Thanks again.
Natarajan
Edited by: Nattu on Mar 14, 2012 11:35 PM -
Custom Tabular Form with working days by quarter
Hi All, I'm trying to create an application to improve an old excel that some people use in my office. I came across a challenge: create a page when a user can submit for each business day the amount of hours worked, the real problem is that I have to show on the same page 40 business days that need to be dynamic, I mean that there is a "period" table that has a start date and end date, the range between those two MINUS the Saturdays and Sundays should be the amount of COLUMNS that the report show.
create table CT_PERIOD(
PERIOD_ID VARCHAR2(6),
PERIOD_FY VARCHAR2(4),
PERIOD_QUARTER VARCHAR2(1),
PERIOD_START_DATE DATE,
PERIOD_END_DATE DATE,
PERIOD_DAY_COUNT NUMBER,
insert into ct_period values ('1', 'FY14', 'Q1', to_date('01-JUN-2013', 'DD-MON-YYYY'), to_date('25-AUG-2013', 'DD-MON-YYYY'), 56);
commit;
I searched in the web for some example of this with no luck, if somebody did something like this or knows where I can see an example that would be great!
Thanks!Hi guys,
I'm having exactly the same problem, I need a tabular form with days as columns to add actual working hours for each day as for each row ( task) -
Customer Tabular Form Questions
I am following the white paper on creating a tabular form from scratch using Html DB ver. 1.6 and having trouble getting the report to show columns as fields. In 1.6 -- There is no 'create sql report (updateable) when you are creating the page. So I had to create the page as a SQL query, then go back and change the region definition type to "SQL query - updateable report, but the rows are still not updatable. What am I missing here?
Here is my SQL:
select
htmldb_item.hidden(1,T.EMP_ID_FK) EMP_ID,
T.HOUR_TYP,
T.SUN_HR,
T.MON_HR,
T.TUE_HR,
T.WED_HR,
T.THU_HR,
T.FRI_HR,
T.SAT_HR
from #OWNER#.HR_TIMESHEET T, #OWNER#.HR_EMPLOYEE E
WHERE T.EMP_ID_FK=E.EMP_ID AND
UPPER(E.Lname) = UPPER (SUBSTR(:APP_USER,2))
Also,
I am creating this page to capture the daily hours worked based on a value entered in a different region (week ending date) -- So week ending date is not part of the tabular form report region (which is just capturing the hours worked by day (M-Sun). When they submit, it should insert the hours by day and the week ending date in the same table.
Is it possible to do this with a tabular form (created from scratch?).
Thanks,
JeffreyThe form that is using the tabular form has columns such as hour_type (OT, Regular, Sick) and then has columns for each day. The TAble has these columns as well as a week ending date. For one week ending date, their could be 3 or more rows:
example: 1 row for hours of OT by day
1 row for Regular hours by day
1 row for Vacation hours by day
I would like to have the week ending date in a different region (that also details the employees personal information) -- and the user would select the w/end date from a date picker within this region.
This also would help by letting the employee enter the w/end date and then he/she could see their hours for that w/end date.
Thanks,
Jeff -
Manual Tabular Form - APEX_ITEM
Hello All,
I'm trying to build my own custom tabular form. I'm using a PL/SQL to return the query, but am getting "FROM not found where expected".
But the code for declaring the APEX_ITEM is correct.
I've been working on this for 2 days and still have not managed to get up a custom manual tabular form. Thanks for any, I mean any suggestions.
I maybe be corrected, but this may also be simply a custom design/ apex_items on the go.
My goal is to acheive the following on the go
Slot 1 - LOV - LOV
Slot 2 - LOV - LOV
Slot n - LOV - LOVHere is what I see in the debug:
0.04: query could not be parsed:
SELECT apex_item.hidden (31, NULL) apex_item.text (32,1,80,100,'style="width:170px" readonly="readonly"','f32_' LPAD (9900 + 2, 4, '0')), apex_item.hidden (33, NULL) disk_pos_name,
apex_item.select_list_from_lov(34,1,'DISK_TYPE_LOV') disk_id,
apex_item.select_list_from_lov(35,1,'RAID_LOV') raid,
apex_item.select_list_from_lov(36,1,'SLOT_STATUS_LOV') slot_status
FROM DUAL union all SELECT apex_item.hidden (31, NULL) apex_item.text (32,1,80,100,'style="width:170px" readonly="readonly"','f32_' LPAD (9900 + 2, 4, '0')), apex_item.hidden (33, NULL) disk_pos_name,
apex_item.select_list_from_lov(34,1,'DISK_TYPE_LOV') disk_id,
apex_item.select_list_from_lov(35,1,'RAID_LOV') raid,
apex_item.select_list_from_lov(36,1,'SLOT_STATUS_LOV') slot_status
FROM DUAL
failed to parse SQL query:
ORA-00923: FROM keyword not found where expectedHere is the PL/SQL block I'm using:
declare
v_count number;
v_name varchar2(100);
v_retstr VARCHAR2(8000);
begin
select disk_slots into v_count from ori_inventory where inventory_id = '142'; --tester value
v_name := '';
for i in 1 .. v_count loop
v_name := '''Slot '|| i ||'''';
v_retstr := v_retstr ||
'SELECT apex_item.hidden (31, NULL) ' ||
'apex_item.text (32,'|| 1 ||',80,100,''style="width:170px" readonly="readonly"'',''f32_'' LPAD (9900 + 2, 4, ''0'')), ||
apex_item.hidden (33, NULL) disk_pos_name,
apex_item.select_list_from_lov(34,1,''DISK_TYPE_LOV'') disk_id,
apex_item.select_list_from_lov(35,1,''RAID_LOV'') raid,
apex_item.select_list_from_lov(36,1,''SLOT_STATUS_LOV'') slot_status
FROM DUAL ';
if i < v_count then v_retstr := v_retstr||' union all '; end if;
end loop;
return v_retstr;
--dbms_output.put_line(v_retstr);
end;Is there a missing concatenate operator here:
'f32_' LPAD (9900 + 2, 4, '0')
Scott -
Hi,
I have created a tabular form on 2 tables by using a view. Unfortunately when I submit the changes I get the following error.
Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01779: cannot modify a column which maps to a non key-preserved table, update "PROJECT2"."TASK_MILESTONES" set "TID" = :b1, "MS_ID" = :b2, "CAT_ID" = :b3, "NAME" = :b4, "DESCRIPTION" = :b5 where "TID" = :p_pk_col
Any suggestions on how to get around this?
TomYou will need to combine the following:
1. Crosstab Query. This blog has an excellent article on CrossTab or Pivot queries:
http://thinkoracle.blogspot.com/2005/09/pivot-and-crosstab-queries.html
The limitation with this method is you will need to fix the maximum number of actions that there are for any given case. Alternatively you could use plsql to return the report sql by first looping through the actions to find the maximum number.
2. Custom Tabular Form. You will quickly find that there a limitations with the wizard generated tabular forms. Custom forms built using the apex_item APIs will give you much more control. This how-to is a useful guide for getting started.
http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html
If you need more explanation on any of these or help writing the code, please let us know.
Cheers
Shunt -
Using a custom PL/SQL to populate the primary key in a tabular form
I want to use a Custom PL/SQL Function to populate the primary key when I insert a new record into a tabular form. I want to get the value from a hidden page Item. The code I am using for the primary key source is:
BEGIN
INSERT INTO TEAM_MEMBERS(TEAM_ID)
VALUES(:P75_TEAM_ID);
END;
When I try to insert a new record I get the following error:
Error ERR-1904 Unable to compute item default: type = Function Body computation_type= BEGIN INSERT INTO TEAM_MEMBERS(TEAM_ID) VALUES(:P75_TEAM_ID); END; .
ORA-06550: line 5, column 2: PLS-00103: Encountered the symbol ";" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe The symbol "exit" was substit
Any ideas what I am doing wrong?
Thanks!Brian - Sometimes whitespace at the end of the block causes this. Be sure to trim everything after the last semicolon including tabs and newlines.
Scott -
Custom Popup on a Tabular Form for Multi Row Operation
I am trying to implement a custom popup on a tabular form that I can pass a value typed in to a text item like âNameâ to the popup so it can filter a list of names on what was already typed in.
Once a selection is made I need to have the selected name passed back to the text item.
This is easily done when not using a Tabular Form. Any ideas would be great?Can someone please help me with this?
I've read the Thread:
"Custom Popup on a Tabular Form for Multi Row Operation",
and have tried following the instructions provided by Willi Firulais.
I've also tried to integrate the instructions provided by RWeide in response within the same Thread.
I cannot get the passBack function to Pass the value to the Calling Page.
(I've tried to organize the pertinent information as it pertains to my application,
and have included it here below:)
A. Calling Page (Page# 141)
1. HTML Header: (Page# 141)
<script> function callMyPopup(item) { var url;
url = 'f?p=&APP_ID.:143:&APP_SESSION.::::P143_ITEM:'+ item;
w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
if (w.opener == null) w.opener = self; w.focus(); }
</script>
2. Region Definition: (Orders) - SQL Query (Updateable Report)
a. Query:
select
'f01_'||to_char(rownum ,'FM0999') ITEM,
"ID",
"ID" ID_DISPLAY,
"ID_PROJECT",
"ID_SUPPLIER",
"DESCRIPTION",
"JOB_NO",
"QUANTITY",
"UNIT_PRICE",
"EXTENDED_PRICE",
"MANUFACTURER",
"SUPPLIER",
"PART_NO",
"GROUP_LIST",
"BILLED_PRICE",
"DATE_NEEDED",
"DATE_DELIVERED",
"SUPPLIER_TYPE",
rownum
from "#OWNER#"."OAX_MAT_ORDER_ITEMS07"
where job_no = :P141_JOB_NO
3. Report Attributes: (ITEM) - URL
javascript:callMyPopup('#ITEM#');
B. PopUp Page (Page# 143)
1. HTML Header: (Page# 143)
<script language="JavaScript"> function passBack(passItem1, passVal1)
{ opener.document.forms["wwv_flow"].SUPPLIER[&P143_ITEM.].value = passVal1;
close(); }
</script>
2. ITEMS:
P143_ITEM
3. Region Definition: (Suppliers) - SQL Query(Structured Query)
OAX_SUPPLIERS.ID
OAX_SUPPLIERS.NAME
4. Report Attributes: (NAME) - URL
javascript:passBack('&P143_ITEM.','#NAME#');
Thank you in advance for you help! -
Custom popup from tabular form
Hi,
I would like to create a custom popup in a tabular form.
The standard popup doesn't realy satisfy my needs.
I followed the "How to" to create a custom popup, so that method is known. And this is working for a part.
I managed to alter the tabular form so that it calls the Javascript to get the popup window by entering :
<INPUT TYPE="TEXT" VALUE="#PROJ_ID#"> Click for LOV
in the HTML Expression of the column format section.
So the popup window is opened correctly, but the problem is how to return the selected value to the text item in the tabular form.
Returning a value to a normal text item is no problem, but it is to return it to a cell in an tabular form.
I tried to enter the following in the Passback Javascript:
opener.document.getElementById("F04").value = passVal2;
But this doesn't work correct and also is not flexible since F04 is the cell for only that row.
So the question is: How can I write my Javascripts Passback function so that it returns the passVal2 value to the right cell of the tabular form?
Any ideas?
Regards GuidoNobody has ever done such thing?
Isn't there a way to address a specific cell in a tabular form?
Maybe then I have to look for another solution:
What I would like is, when selecting something from the popup (in the tabular form) a second column (The description column)has to be filled in with a value looked up from the selected popup value. This is just a default value,this "Description" field must be a text field so that users can change the description before "saving" the record to the table.
So anybody has an idea how this can be implemented?
Thanks for your help in advance!
Guido -
Custom error message in a tabular form
Hello,
I try to implement a solution for a custom error message in a tabular form.
My intention is, that a error message about a foreign key constraint violation should told the end user what happens in a friendly way.
So I try to implement my own delete-process, where I can catch the exception and display my own error message.
In the process I use the following code to delete the selected row:
begin
for i in 1..apex_application.g_f01.count loop
delete from d_cmp_campaign
where campaign_id = apex_application.g_f02(i);
end loop;
end;
And this is the select of the tabular form:
select
"CAMPAIGN_ID",
"CAMPAIGN_ID" CAMPAIGN_ID_DISPLAY,
"NAME",
"CAMPAIGN_NO",
"DWH_DEF_TIME",
"DWH_DEF_USER"
from "#OWNER#"."D_CMP_CAMPAIGN"
The problem is, that the first row is deleted always, whatever row is selected.
Can anyone help me with that issue?
Thank you,
TimEvery checkbox has a value which is the corresponding row. You got to get the row number
first and based on that you select the record. For example, if you click the rows 1 and 5,
you first need to know which rows are selected. Then, you would loop twice and get the
first and the fifth array values.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Need customized query on updateable report (tabular form)
I have a pl/sql function that returns a SELECT statement based on very flexible query specifications allowed in a form. (Form has a field for each table column, allows operations like <,>,between, etc, that can be entered directly into the field; all fields need not have some sort of query constraint specified. Essentially the same sort of query flexibility you get in Forms... ) The select always returns the same number of columns. Query results are returned on a different page (either report or tabular form) than that used to enter the query specs.
The function works beautifully on a page type of Report.
However, when I take a Tabular Form and switch its query source to PL/SQL function body returns SQL select, the page type becomes Report. The query works on this modified page (returns correct rows), and the columns are still editable (can be typed into) but the changes can't be submitted because the page is no longer a tabular form -- Error is: No updateable report found. Multi row updated and delete operations can only be performed on tabular forms of type 'Updateable Report'.
How can I have flexible query specs paired w/ an updateable report? Does this require writing my own multi-row DML processes? Or is there a simpler way?
Thanks,
CarolI have a pl/sql function that returns a SELECT statement based on very flexible query specifications allowed in a form. (Form has a field for each table column, allows operations like <,>,between, etc, that can be entered directly into the field; all fields need not have some sort of query constraint specified. Essentially the same sort of query flexibility you get in Forms... ) The select always returns the same number of columns. Query results are returned on a different page (either report or tabular form) than that used to enter the query specs.
The function works beautifully on a page type of Report.
However, when I take a Tabular Form and switch its query source to PL/SQL function body returns SQL select, the page type becomes Report. The query works on this modified page (returns correct rows), and the columns are still editable (can be typed into) but the changes can't be submitted because the page is no longer a tabular form -- Error is: No updateable report found. Multi row updated and delete operations can only be performed on tabular forms of type 'Updateable Report'.
How can I have flexible query specs paired w/ an updateable report? Does this require writing my own multi-row DML processes? Or is there a simpler way?
Thanks,
Carol -
How to use a function in Tabular Form?
I'm trying to build a tabular form maunally with a region of type "pl/sql function body returning sql query". The first column is a regular column in the table and in the second column is calculated column, I would like to pass the first column value to the function in second column and display that value. When I use the following query, it's passing "id" literally, instead of the actual value at the run time. any help is appreciated.
declare
query_str varchar2(1000) := NULL;
begin
query_str := 'SELECT HTMLDB_ITEM.DISPLAY_AND_SAVE(1,id)"id" , HTMLDB_ITEM.TEXT(2, test_function(id),10,100) "Name" from testtable';
return query_str;
end;Hi,
the query looks ok. What happens when you run the query in SQL*Plus/Toad/... ?
SELECT HTMLDB_ITEM.DISPLAY_AND_SAVE(1,id) AS id, HTMLDB_ITEM.TEXT(2, test_function(id),10,100) AS name from testtable;Personally I wouldn't use the quote for the alias name of the column, because that makes them case sensitive. I know that the APEX wizard always uses quotes, also for tables/columns where it is not necessary...
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com
Check out the ApexLib Framework: http://apexlib.sourceforge.net
Maybe you are looking for
-
Reading File from a Desktop/ShareFolder in SAP MII 14.0
Dear Experts, I have a situation where I want to read a CSV file from a source different than SAP MII server. Basic intention is to read a file from a desktop or some shared folder. My first doubt is- Is it really possible in SAP MII 14.0 version? Bu
-
can anyone help me on finding a fix for this. the router im using is a BThub3 ...thanks
-
RichTextEditor.htmlText
Hi All, I need to send mail(using cfmail) with the content created in flex "RichTextEditor". I have successfully send the mail but the mail content not redering properly. Any has faced this type of issue earlier with RichTextEditor?
-
Can't delete photos while viewing a smart album
How come iPhoto won't let me delete images that are being displayed in a smart album? This is very frustrating!
-
Impossible download actualization for PSE 9 error-code 16822
How to download actualization for PSE 9 when error-code 16822 appears?