HTMLDB_ITEM ... Help
Hi I have the basic update form as shown below... I am trying to capture the data that is associated with the checked rows...
Report with checkbox:
select htmldb_item.checkbox(1,empno) empno,
ename,
htmldb_item.select_list_from_query(3,job,'select distinct job, job from emp') job,
htmldb_item.popupkey_from_query(4,mgr,'select ename, empno from emp',10) mgr,
wwv_flow_item.date_popup(6,null,hiredate) hiredate,
htmldb_item.text(7,sal,10) sal,
htmldb_item.text(8,comm,10) comm,
htmldb_item.select_list_from_query(9,deptno,'select dname, deptno from dept') deptno
from emp
pl/sql submit process to capture rows..
FOR I IN 1..HTMLDB_APPLICATION.G_F01.COUNT
LOOP
insert into test_table (pk) values ( HTMLDB_APPLICATION.G_F07(HTMLDB_APPLICATION.G_F01(i)) );
END LOOP;
Every time I run this process I get the following error...
ORA-01403: no data found
I am not sure why this is happening, I can insert HTMLDB_APPLICATION.G_F07(i) but it is not letting me reference "the seventh column" for each row that has been selected...
any ideas?
See Re: Problem with validation and tabular form
Indices for F07 go from 1 to number of rows rendered on the report.
f_07(f01(i)) evaluates to f_07(1234) if you select the checkbox corresponding to empno=1234.
Clearly, this will generate a ORA-1403 since you don't have 1234 rows in your tabular form.
Similar Messages
-
Checkbox in tabular form - help needed
I'm trying to build a tabular form, with a checkbox for a field that can have value 'Y' or 'N'. Adding the checkbox is no problem, with the htmldb_item.checkbox API.
However, processing it is.
On this forum I found a way to process the checkboxes, by looping through all the records (with the help of htmldb_item.hidden in which the id is stored) and reading the value from the checkboxes and updating the column if the checkbox is checked. (see Re: Report with updateable checkbox)
however, as soon as I add a htmldb_item.hidden item, I receive the following error when I submit the tabular form to the Multi Row Update process:
"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. "
My query:
Select id
,htmldb_item.hidden(1,id)
,htmldb_item.checkbox(2,id, decode(field, 'Y', 'CHECKED', NULL))
from table
What am I doing wrong?
is there a better way to process a tabular form with checkboxes?
Or should I process all the rows manually by updating every record even if it hasn't changed (with a loop through all the records)?Tonnie, did you ever get an answer to this question?
Michael Cunningham -
Reports not retaining carriage returns from htmldb_item.textarea
Im created a tabular form for multi row updates using htmldb_item.textarea for one of the fields. When I update the tabular form it keeps any carriage returns in this field, which is good. I then created a PL/SQL function body returning a SQL Query report for printing purposes. The problem is that the field populated by the htmldb_item.textarea does not retain any of the carriage returns in the report.
I enter the following in the textarea on the tabular form:
Line 1
Line 2
Line 3
The report I created then displays the data as:
Line 1 Line 2 Line 3
I need the report to display the data the same as it appears on the tabular form.
I tried this in my report from reading other similar situations on this forums, but didnt work.
replace("TEXTAREA",''||chr(13)||'',''||
||'') as title
Anyone know of a solution?How about this?
Go the page where you can edit the report column attribute - here is the bread crumb to help you figure out what I am talking about
Home>Application Builder>Application 99999>Page Definition>Report Attributes>Column Attributes
The second box in this page is Column formatting, you will find 4 text boxes (Number / Date Format, CSS Class, CSS Style, Highlight words) and a text area (HTML Expression). In the text area replace #COLUMN_ALIAS# with <PRE>#COLUMN_ALIAS</PRE>. You will get your newlines without tweaking the query or removing Strip HTML. Strip HTML is a security feature that I would not disable. On the down side you will loose some of the ability to format like fonts etc (:-(,
Here is why you loose the newlines in the report. When browsers render html they have the liberty to reformat it. When reformating they can play around with whitespaces including new lines. To force a new line you have to use the BR tag or you can say the text is preformated using the PRE tags. -
Hi All:
I am using a javascript for checking the date comparision while testing i found this error and this is serious to me
date comparision works fine with the same month the probem wht i am facing is
eg start date 31-jan-2008 and end date is 24-feb-2008 there is no error is get
if start date is 24-jan-2008 and end date is 14-feb-2009 it through me a alter msg saying start date is greater then end date
there is some mistake in the script i beleve please suggest and help me out how to fix this problem
the script wht i am using is this
<script type="text/javascript">
function checkdates_baseline(pStartDateItem,pEndDateItem)
var sdate = document.getElementById(pStartDateItem).value;
var edate = document.getElementById(pEndDateItem).value;
var amonths = new Array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');
var start_date = new Date();
var end_date = new Date();
var start_month = sdate.substring(3,6);
var end_month = edate.substring(3,6);
var nstart_month = 0;
var nend_month = 0;
for(i=0;i<12;i++)
if(amonths == start_month)
nstart_month = i;
if(amonths == end_month)
nstart_month = i;
start_date.setFullYear(sdate.substring(6,10),Number(sdate.substring(3,5))-1,sdate.substring(0,2));
end_date.setFullYear(edate.substring(6,10),Number(edate.substring(3,5))-1,edate.substring(0,2));
var result = (end_date - start_date);
if( result < 0)
alert('The End date must be after the Start Date');
</script>
thanks
sudhirBut wht i am using is apex collection date picker which is of the format
dd-mon-yyyy this is the default format in it
i think there is no option available to make this using pl.sql process for validating this
the code which i posted before it is comparing with the days but month it is not happening i have posted the javascript code above works fine need to know where the problem in the code
or is there any other way in doing this i am not using a date picker item i am using
select
HTMLDB_ITEM.DATE_POPUP(1,rownum,,'dd-mon-yyyy') start_date
HTMLDB_ITEM.DATE_POPUP(2,rownum,,'dd-mon-yyyy') end_date
from dual
Sorry i wont repeate this next posting twise
thanks
sudhir -
HTMLDB_ITEM.SELECT_LIST_FROM_QUERY - not found error
Hi!
I am trying to use HTMLDB_ITEM.SELECT_LIST_FROM_QUERY in a page source and getting the error message: ORA-06550: line 2, column 4: PLS-00221: 'SELECT_LIST_FROM_QUERY' is not a procedure or is undefined.
This is HTMLDB 2.0 on Oracle 10.2.0.1.0 on Windows 2000.
All help is appreciated.
Thanks!
Dave VenusChet, I am still having trouble making this work. Let me cover each of the fields in the form and lets see where I am going wrong...... Sections with only a header have the default values.
Name Section:
Page: 4
Name: P4_GROUP_ID
Display As: Select List
Displayed Section:
Sequence: 20
Region:
Begin on new line: YES Field: YES ColSPan: 1 RowSpan: 1
Label Section:
Element Section:
Source Section:
Source Used: Only when current value is session state is null
Source Type: Static Assignment (value equals source attribute)
Source Value or Expression: P4_GROUP_ID
Post Calculation Computation:
Format Mask:
Default Section:
List of Values Section:
Named LOV: Group_Names
Display Extra Values: No
Columns: 1
Display Null: Yess
Null Display Value: -- Select Group --
List of Values definition: select group_name display, group_id return
from #OWNER#.ittp_group
ordeer by 1
Security Section:
Conditions Section:
Condition Type: - Item Not Conditional
Read Only Section:
Read Only Condition Type: Value of Item in Expression 1 is NOT NULL
Expression 1: P4_GROUP_ID
Expression 2:
Help Text Section:
Configuration Section:
Comments Section:
I really appreciate your time, patience and help!
Dave Venus -
Values for htmldb_item.text field do not display in CSV output
HTML DB experts,
I have a report query with the following 2 items in the SELECT statement:
wwv_flow_item.display_and_save(2, DOC_CD, 10) DOC_CD,
htmldb_item.text(3, DOC_DESC, 50, 255) DOC_DESC
I have enabled the CSV output for this report. The problem is, when I generate a csv file, only the DOC_CD (wwv_flow_item.display_and_save) displays. The values for the DOC_DESC (htmldb_item.text) do not display. What do I need to do to get the DOC_DESC to display?
Thanks for your help.
Message was edited by:
[email protected]Items rendered using htmldb_item generate HTML tags on the form, not plain text. You are right, the CSV export excludes them.
Your best best is to create another report region on some other page with the same query except replace all the htmldb_item() calls with regular columns i.e. make it a read-only report and use the "export: CSV" template and put up a link to this page at the bottom of your editable report (instead of the builtin CSV link). This way when you click on this link, it will generate your report and immediately offer to export it to CSV
Hope this helps. -
Why I cannot process a disabled field when using htmldb_item
I have a report that has this in the select statement
case when c.sec_lic_status in (1,2,7,505,1002,1004,1005) then
htmldb_item.text(2,sum( distinct a.fee_variable),8,20)
else
htmldb_item.text(2,sum( distinct a.fee_variable),8,20,'disabled')
end "Quantity 1"
The above shows correctly. If there are 2 records one field is disable and the other is enabled.
I have a process that fires on submit - after Computations and Validations. But the records don't changed when updating the enabled one.
In debugging and writing to a file using the UTL_FILE package, I'm able to pinpoint that the disable fields are the problem.
Is there a trick on manually processing disabled fields?
I've found that when I uncheck the show box in the report, I cannot use the fields either. This is not a problem, just another comment.
My main problem is what do I have to do to manually process a disabled field.
Thanks for your help, comments, pointers, or anything that could help me or give me ideas.
juanJuan - HTML items with the disabled attribute are not POSTed with the form so your after-submit processes never see them. Try 'readonly="readonly"' instead. Others may be able to suggest how to also give those cells a greyed-out appearance.
Scott -
Hi,
I have created a SQL report with HTMLDB_ITEM package. IN that report, I have generated a report column using SELECT_LIST_FROM_LOV, which can be used by the admin to update the column entry.
Here is the link:-
http://apex.oracle.com/pls/apex/f?p=50508:8:
The update is working fine, The issue is, if you download this report as a CSV, it will export all the values of the select list for that particular column. Is there any way to restrict the export to the single value of that column( or the current value in the database). Please help/ suggest.
thanks
VGBrian,
This example:
http://htmldb.oracle.com/pls/otn/f?p=31517:176
and this example:
http://htmldb.oracle.com/pls/otn/f?p=31517:160
may help you.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Hi,
I used HTMLDB_ITEM.SELECT_LIST_FROM_QUERY on my custom tabular form. Some of the option display values selected from my table have commas (',') in them, but commas won't get displayed in the resulting select menu, nor are they seen in html source. In the html source however I see that they are probably replaced with spaces (' '). Is it a bug and is there a workaround? Which symbols are replaced in the DISPLAY_VALUE and thus should be avoided (if there is no workaround I should include this information in the help text)?
Kaja TreesYet in my application there are two regions side-by-side on my test page, one with a query of
select htmldb_item.SELECT_LIST_FROM_QUERY( 10, 0
, ' select NAME as DISPLAY_VALUE
, ID as RETURN_VALUE
from OBJ_TPL_SELECT_OPTION'
, ' class="search-table-input-long" ' -- make it longer
, 'YES' -- show empty choice
, '0' -- empty choice value
, '...' ) -- empty choice display
as sel
from dual
which results in a html source of:
<tr><td class="table-work-overview-firstrow">SEL</td></tr>
<tr><td class="table-people-overview-white"><select name="f10" class="search-table-input-long" ><option value="0">...<option value="7059909" >1mbit/s<option value="7059910" >NAT DHCP pordi suunamine</select></td></tr>
and the other with a query of:
select NAME as DISPLAY_VALUE
, ID as RETURN_VALUE
from OBJ_TPL_SELECT_OPTION
resulting in following html source:
<tr><td class="table-work-overview-firstrow">DISPLAY_VALUE</td><td class="table-work-overview-firstrow">RETURN_VALUE</td></tr>
<tr><td class="table-people-overview-white">1mbit/s</td>
<td class="table-people-overview-white">7059909</td>
</tr><tr><td class="table-people-overview-white">NAT, DHCP, pordi suunamine</td>
<td class="table-people-overview-white">7059910</td>
</tr>
Where should I look for the reason of no commas in the first result?
Confused,
Kaja -
Hi, i am trying to create a tabular form
with one of the item's value depending on another item's value, but i have an ORA-01722: invalid number error
my application is:
DESC AC6LIS
ACLIS_SEQ_ID NOT NULL NUMBER(10)
ACLIS_TSG_ID NOT NULL VARCHAR2(5)
ACLIS_EDZ_ID NOT NULL VARCHAR2(3)
DESC VE1EDZ
EDZ_TSG_ID NOT NULL VARCHAR2(5)
EDZ_ID NOT NULL VARCHAR2(3)
EDZ_DESCRIZ VARCHAR2(50)
select ACLIS_TSG_ID, htmldb_item.select_list_from_query(2,ACLIS_EDZ_ID,'select EDZ_DESCRIZ, EDZ_ID from ve1edz where ve1edz.EDZ_TSG_ID ='||ac6lis.ACLIS_TSG_ID) edz_select_list from ac6lis
Any Help?
Thans in advance
CostantinoWhen your inner SELECT statement is firing it is doing a type conversion. It is seeing a number value in 'ac6lis.ACLIS_TSG_ID' and trying to do a number comparison with 've1edz.EDZ_TSG_ID'. 've1edz.EDZ_TSG_ID' has a non-numeric value in one of the rows which results in your error. To correct this place quotes around the value of 'ac6lis.ACLIS_TSG_ID' like:
select ACLIS_TSG_ID,
htmldb_item.select_list_from_query(2,ACLIS_EDZ_ID,'select EDZ_DESCRIZ, EDZ_ID from ve1edz where ve1edz.EDZ_TSG_ID ='''||ac6lis.ACLIS_TSG_ID||'''') edz_select_list
from ac6lisMike -
Help with Multiselect List Item
Assuming one employee can work for multiple departments, I want to display the departments employee 7844 works for preselected in a multiselect list.
I am using the following query statement in a report region.
select htmldb_item.select_list_from_query_xl(1, deptno ,'select DEPTNO,DNAME from scott.dept ','MULTIPLE HEIGHT=25', 'Y',null,null,null,'Department',null) a from scott.emp where empno = 7844
The result I am seeing is a multiple multiselect lists with one department selected in each list.
How should I modify the query to get what I want?
Thanks
MinaHi Carlos,
I set up a test case in exactly the same way and it worked fine for me. I created a page item called P1_DA_DEMO and added some static select list values then added some help text. The settings I used are below, I suggest you try again but also make sure you have no other Javascript errors on the page. Use a tool like firebug to check.
Name : Dynamic Action Demo
Sequence: 10
Even: Click
Selection type: Item(s)
Item(s): P1_DA_DEMO <- a selection list item
Condtion: - No Condition -
True Actions
Sequence: 10
Action : Execute JavaScript Code
Fire when event result is :True
Fire on page load: Not Ticked
Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')
Event Scope set a s Bind.
Thanks
Paul -
HTMLDB_ITEM.TEXT : disable item !
Hello,
I have a question regarding the use of HTMLDB_ITEM.TEXT,
Exemple, if my report contains the following :
select
HTMLDB_ITEM.HIDDEN(1,p.id) id,
HTMLDB_ITEM.TEXT(2,p.year) year,
HTMLDB_ITEM.TEXT(3,p.name) name
FROM person p
where p.id = :P1_ID
- the column year is diplayed but I have to disable it.
- the column name is updated by the user.
the save process is the following :
for i in 1..wwv_flow.g_f01.count loop
if wwv_flow.g_f01(i) is not null then
update person set name = wwv_flow.g_f03(i)
where id=:P1_ID and year = wwv_flow.g_f02(i) ;
end if;
end loop;
works fine.
My problem is : I must disable the column year, I have do the following :
select
HTMLDB_ITEM.HIDDEN(1,p.id) id,
HTMLDB_ITEM.TEXT(2,p.year,3 ,2, 'DISABLED=DISABLED') year,
HTMLDB_ITEM.TEXT(3,p.name) name
FROM person p
where p.id = :P1_ID
Now, wwv_flow.g_f02(i) is no longuer recognized !!!!!!
Any help !
Jina.Jina,
Perhaps this posting helps?
Re: Bug: Disabled items on tabular form
Regards,
Marc -
JavaScript for HTMLDB_ITEM.TEXT
Do we support Javascript for HTMLDB_ITEM.TEXT ?
If so let me know the syntax
Not able to find the same in HTMLDB Help
thanks
-prashantHi Got it
FYI
HTMLDB_ITEM.TEXT(1,field1,8,10,''onchange=javascript:Hi();'')
thanks
-prashant -
How to validate htmldb_item form item
I have a multiple row form item using htmldb_item.text ( so that a user can enter a quantity for that row item ).
How is validation best handled to ensure that a value is entered for that row?
note: there is also a htmldb_item.checkbox on the row that the user checks to flag that an operation should be done.
Thanks as usual
Billfor what this is worth:
as scott said, only checked values are passed through from htmldb_item.checkbox'es over to the htmldb_application.g_fNN arrays. that's just how conventional web checkboxes work. if you want to keep your checkboxes in your form, just do their processing in a separate loop. if you're having a hard time keeping the values of your checkbox array matched up with the other htmldb_item values from their corresponding rows, just make sure your checkboxes return values you can use to identify your checked rows. so if you were going against the emp table, i'd suggest having your checked values return EMPNO's...
select htmldb_item.checkbox(1,empno) c from emp
...that way you could more easily match those empno's up with your other htmldb_application.g_fNN values during your page processing.
hope this helps,
raj -
HTMLDB_ITEM.CHECKBOX
I used HTMLDB_ITEM.CHECKBOX(1,"field") in a tabular report, now I need to make a button, or something like that, to select all the row checkboxes, but I don't know how to work with it, I'd really appreciate if anyone could help me with this, giving me the link to any page about it or telling me the way to do it.
Víctor Carmi Larafor i in 1..htmldb_application.g_f01.count() loop
-- do some DML; values of checkboxes are referenced with htmldb_application.g_f01(i)
end loop;Jure
Maybe you are looking for
-
Hi, I am a professional photographer and am looking to remake my website. My current site is in flash and I notice that the majority of photographer's sites are in flash. I love the flash photo gallery on this website. http://www.margecasey.com/da
-
Created preloader, and after flash loaded want stop on label 'welcomeSite'. And on that label will have button, after click this button what play code from function 'irisDescription'. But see error: TypeError: Error #1009: Cannot access a property or
-
How can I get the username of the person currently logged in?
I have built a custom authentication scheme and I am building a form page and I would like to show the username of the person who is currently logged in? How can I do this......
-
"Force Quit" command doesn't work
Apple-Option-Esc, or Command-Alt-Escape, or whatever you'd like to call it. It stopped working. I'm on an early 2011 MacBook Pro, 10.8.2. I can't find anything from other people having this problem. I can force quit applications that are already open
-
Доброго времени суток уважаемый Евгений. Adobe Camera Raw некорректно открывает NEF File (.NEF). В контрастных фотографиях в тенях не сохраняется информация,цветовые искажения. При помощи Capture One Pro 8 открываю фото,конвертирую в TIF File (.TIF),