Change Value of HTMLDB_ITEM using HTMLDB_ITEM.CHECKbox

Hello,
I've got a region with a 'pl/sql function returning sql query'
declare
q varchar2(4000);
begin
q:=' select htmldb_item.checkbox(1,t.jedi_ean_id) as Auswahl, ';
q:=q||' t.ean, j.artikelbezeichnung, ';
q:=q||' t.artikelmengeneinheit, ';
q:=q||' htmldb_item.text(2,t.iln) as ILN, ';
q:=q||' from malus.jedi_ean t; ';
return q;
end;
My Query return for example 10 rows. Now I want to check 5 of this 10 rows using the checkbox.
With the following PROCESS i am able to save the new values of the field ILN to the Database.
for i in 1..HTMLDB_APPLICATION.G_F01.COUNT
loop
update jedi_ean j
set j.iln = HTMLDB_APPLICATION.G_F02(i),
where j.jedi_ean_id = HTMLDB_APPLICATION.G_F01(i);
end loop;
Now to my Problem:
I want to have an input field outside of this report where the user can manually set the value of the field ILN.
Afterwards the user checks 5 of the 10 rows and then he should have the possibility to click on a button
to assign these values to the 5 checked rows in the report, not in the database.
After this step the user should click on a submit button an start the existing process above.
Is this possible??

Hi,
I do not know can you do that with dynamic action or is there of of box solution.
But see this example
https://apex.oracle.com/pls/apex/f?p=40323:30
You can bind onchange event to text field, and call Ajax to get emp name.
Then use sample JavaScript to set value to display only item
Regards,
Jari

Similar Messages

  • How to change value in database using oracle form

    - i have a table called mobilephone with quantity column
    - i already created a list of quantity inside my form with elements 1-5
    - what i want is when i press a button inside my form it will automatically deduct the value i chose from list to the database
    - for example if my quantity inside the table is 10, when i chose 2 in the list it will become 8 in the table

    Hi,
    I agree with Roel, but it might not be enough for you. This depends on the usage, and more specifically the number of concurrent users that might do the same kind of transactions.
    If user1 has selected 5 phones, and at the same time user2 has selected 6 phones, then only at the moment they hit the "Apply Changes" or "Create" button, will they know whether they the number of phones they require are actually available.
    If this scenario is highly unlikely to occur, I would go with the trigger as Roel indicated. If it is likely to occur, you might want to consider using Javascript to immediately check the availability through a database function call. This will require some database changes, that I could elaborate on. But I will wait until you indicate that this is indeed what you need.
    Good Luck!
    Remco

  • Changing values in grid

    Is there a way of changing values in grid using radio buttons
    or dropdown list?

    Yes, exactly that however I would like to be able to change
    values from either radio button selection or dropdown list.
    From my research on the web I found that flash forms won't
    list values in a drop down box only the applet version will handle
    the dropdown selection.
    Since your are from the adobe. Could you let me know of a
    best way or practice to debug flash forms. It is time consuming to
    trouble shoot since all you got is a blank page.
    Does Flex 2 takes care of all the limits of CFFORMS?
    could you elaborate on this.
    Thanks

  • 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 Lara

    for 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

  • HTMLDB_ITEM.CHECKBOX and Multiple Pages

    Hi
    I have used a SQL query as a source for a region and I generate checkboxes dynamically using HTMLDB_ITEM.CHECKBOX function. Everytthing works fine as long its in one page. When I set the pagination to show only 15 rows per page and when I click save from the second page (showing rows 16-30) the value of HTMLDB_APPLICATION.G_F01.COUNT becomes zero. And the values of the checkboxes are not recognised. Is this a known issue and any solutuion to it?

    Hi,
    two part question:
    Do I need to pass session state from page to page in the same application? (I do not think so, but I am not sure)
    secondly do you know why this code
    for i in 1..htmldb_application.g_f01.count
    loop
    if htmldb_application.g_f01(i) !=0 then
    :P14_INFO_ID := htmldb_application.g_f25(htmldb_application.g_f01(i));
    end if;
    end loop;
    in which I am trying to get 1 column for the row that is checked
    would result in this in the debugger:
    ...P14_INFO_ID session state saving same value: "" indicating that the session state for that column was not saved?

  • Htmldb_item.checkbox : multiple attributes

    Hi,
    I was wondering if there is a way to specify multiple attributes for a checkbox using htmldb_item.checkbox
    I would like the checkbx to be checked and disabled.
    In the sttribute param. I can specify 'CHECKED" or 'DISABLED'. I would like to specify both
    any help

    Hi Tyler,
    Here is the example:
    Table 1.
    Issues Table:
    issue id, issue_Description
    Projects:
    project id, Description
    Project_issues:
    project id, issue id, issue encountered(Y/N)
    I want to display read only checkboxes.
    issues decription is stored in Issues Table, and values (Y/N) are stored in Project_issues
    So for a particular project I would like to see list of all issues(checkboxes)
    This is how it looks like
    For projectid: p1
    issues 1 (CB) (X)
    issue 2(CB)
    These are diisabled or read only.
    any idea how should i use check boxes in html db. I tried creating LOV
    select issue_description d, issue_id r
    from issuees;
    This lov display checkboxes. But How Can i get values of these checkboxes from table project _issues.
    thanks a lot for your help

  • HTMLDB_ITEM.CHECKBOX  p_checked_values Length 4000

    Hi,
    I am using the HTMLDB_ITEM.CHECKBOX and the values that are checked by default is dynamically generated. Once the length of p_checked values crosses 4000, I get the following error.
    ORA-01704: string literal too long
    Please suggest if there is a workaround for the same.
    Thanks,
    Rajesh.

    I am trying to generate a report. This is how the query is returned.
    q := ' select HTMLDB_ITEM.CHECKBOX(1,empid ,NULL,'
    || ''''
    || v_existing_selection
    || ''''
    || ','
    || ''':'''
    || ')'
    || '"Select",'
    || ' col2'
    || ' col3'
    || ' col4
    || 'from table 1,table2'
    The v-existing selection which indictes the boxed to be checked by default is formed dynamically. It has the list of all the Ids that satisfy a particular criterion.
    So, when the number of Ids are more, the v_existing_selection length increses adn at one point, it crosses 4000 and i get the error stated above.
    Please advice.

  • Checkboxes - htmldb_item.checkbox multi-record updatable report

    htmldb_item.checkbox can be used to display retrieved database values as a check box (e.g. a Y/N Flag).
    These can also be added to an updateable report in a multi-record tab.
    When a new record is created on the multi-row tab however there appears to be no way to render a checkbox. Instead a text box appears instead.
    Is there any way to acheive this?
    This data needs to be present in a multi -row layout
    Thanks
    BTW - I have checked the docos and read the forums.

    Firstly, thank you for the reply.
    I must clarify what I am doing.
    I have a table that has a column in it that is called ZEROFUEL. This can have a value of either Y or N. The user wants a block of these records (say eight) per screen. This column need to be represented by a checkbox. I manage this by calling the NVL(htmldb_item.checkbox(10,ID, DECODE (ZEROFUEL,'Y','CHECKED')),'N')ZEROFUEL, in the report select statement.
    The automatic checkbox (for deletion) is added by the wizard no problem. It is the checkbox for the column ZEROFUEL I am having the problem with.
    If I do not render the checkbox from the sql select then the wizard just creates a little text field display.
    Everything works fine until I press the ADD button. A new record pops up on the bottom of the block with no checkbox on the ZEROFUEL column.
    Eventually there are four columns I need to display as a checkbox. These all need to be displayed in the multi-record tab.
    Am I missing something.
    Thanks

  • Using a checkbox to display a value in another cell

    I want to use a checkbox in cell A1 to display in cell B1 either 0 or a value that's in cell C1. I've tried the IF function, but I keep getting a syntax error. Any ideas?

    How could you do the same thing but using only two cells?
    where the check box returns a specific value in the second.
    in this instance its for a staff registration sheet where a checkbox in (A) would return a set value in (B)
    i know this might sound simple to you guys in the know but i cant figure it out! I have been messing around trying things with the if function but still only shows me the red triangle (syntax error).
    A simple solution would be much appreciated.

  • Label for htmldb_item.checkbox

    Is there a way to put a display label for checkboxes rendered with htmldb_item.checkbox?
    I know it doesnt make much sense to put a label on every row next to each checkbox on a report region, but just wanted to know if it was possible.
    Thanks

    Thanks, that works!
    I just tested this out on the hosted site (24317:4)
    What does the
    onMouseOver="row_mouse_over1517788416209474431(this, 1)"
    stuff in the table do? I am pretty sure I dont get that on my site. Is it related to the theme/template? it doesnt seem to do anything
    Thanks

  • A quick question about the htmldb_item.checkbox function

    I know many posts about checkbox have been posted, yet I couldn't find the answer after some searches.
    I have something like:
    select
    htmldb_item.checkbox(1, col_name)
    from...
    What I need is to have is the the heading of the checkbox column same as what the wizard does. I mean you can 'check all' with that. If I put a string after the right parentheses, I got that string rendered as the name of the checkbox column, which was not I want.
    I couldn't find the answer from the document, neither from the how-to.
    Thanks in advance.

    What I need is to have is the the heading of the
    checkbox column same as what the wizard does. I mean
    you can 'check all' with that. If I put a string
    after the right parentheses, I got that string
    rendered as the name of the checkbox column, which
    was not I want.
    I couldn't find the answer from the document, neither
    from the how-to.Do you want a checkbox as the header for the checkbox column? So you can check/uncheck all the checkboxes? If so, this is addressed directly in the how-to.
    If this is not what you want I don't understand exactly what it is that you're attempting. Perhaps some elucidation would be in order?
    Earl

  • Use of Checkboxes on reports

    Hi
    I am using the HTMLDB_ITEM.CHECKBOX function. It works fine in the report, as below;
    SELECT
    "POOL_CARS"."ID" "ID",
    "POOL_CARS"."REG_NUM" "REG_NUM",
    "POOL_CARS"."MAKE" "MAKE",
    "POOL_CARS"."BHP" "BHP",
    "POOL_CARS"."PURCHASE_DATE" "PURCHASE_DATE",
    "POOL_CARS"."MODEL" "MODEL",
    "POOL_CARS"."COLOUR" "COLOUR",
    "POOL_CARS"."STYLE" "STYLE",
    "POOL_CARS"."PRICE" "PRICE",
    "POOL_CARS"."AVAILABLE" "AVAILABLE",
    HTMLDB_ITEM.CHECKBOX(1,"AVAILABLE",
    DECODE(AVAILABLE,'Y','CHECKED',null)) "Av ",
    "POOL_CARS"."DEPT" "DEPT"
    FROM
    "#OWNER#"."POOL_CARS" "POOL_CARS"
    I want to use the checkbox to cause an update to the table (set Avail to Y where the box is checked, and to N for all other rows). So I have then created a submit button and a process to be run as follows
    FOR I in 1.. HTMLDB_APPLICATION.G_F01.COUNT LOOP
    UPDATE POOL_CARS
    SET available = 'Y'
    WHERE ID = to_number(HTMLDB_APPLICATION.G_F01(i));
    htp.p('debug' || HTMLDB_APPLICATION.G_F01(i));
    END LOOP;
    I have a few problems here.
    1. When the page is run the check boxes show up fine. When submit is pressed I get
    ORA-01722: invalid number.
    2. The line 'htp.p('debug' || HTMLDB_APPLICATION.G_F01(i));' does not seem to do anything !
    3. I do not understand how to connect the current line within the loop to an actual row as the where clause is not realistic.
    Can anyone help.? .

    Jelane,
    You have to reference the "ID" in your htmldb_item.chekbox api:
    htmldb_checkbox(1,"ID",.....
    Hope this helps,
    Jos

  • Problem using a checkbox in a DB update. Please help

    Hello;
    I am writting a little application as a type of control. I am
    using a checkbox as lets say an on off switch. All my pages work
    nice up to the point of turning the check off, or taking it away so
    the BD table field is blank. I get an error when I uncheck the box
    and hit update. Can anyone help me? I will attach my code, here is
    the error I get:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
    UPDATE statement.
    The error occurred in
    C:\websites\108392zj7\sound\sound_RecordAction.cfm: line 9
    7 : <cfif ParameterExists(Form.btnEdit_OK)>
    8 : <cfif ParameterExists(Form.RecordID)>
    9 : <cfupdate datasource="#sitedatasource#"
    username="#siteUserID#" password="#sitePassword#" tableName="sound"
    formFields="#Form.FieldList#">
    10 : <cflocation url="sound_RecordView.cfm">
    11 : </cfif></cfif>
    SQL update sound set on= (param 1) where ID= (param 2)
    DATASOURCE csee
    VENDORERRORCODE -3503
    SQLSTATE 42000
    attached is the code for the 3 pages I am using to run this
    little app for now. (Will be condensing it down to 1 or 2 pages
    soon.
    Please help, I have been looking at this code for 2 days now
    and can't get it to function properly.
    Phoenix

    I did change the code on the edit page with a soundOn field.
    here is the code:
    <html><head>
    <title>sound - Edit Record</title>
    </head><body bgcolor="#FFFFFF">
    <font size="+1">sound</font> <br>
    <font size="+2"><b>Edit
    Record</b></font>
    <cfoutput>
    <form action="sound_RecordAction.cfm" method="post">
    <input type="hidden" name="FieldList"
    value="#FormFieldList#">
    <cfif isDefined("URL.RecordID")>
    <input type="hidden" name="RecordID"
    value="#URL.RecordID#">
    <input type="hidden" name="ID" value="#URL.RecordID#">
    </cfif>
    <table>
    <tr>
    <td valign="top"> on: </td>
    <td>
    <input type="checkbox" name="soundOn"
    value="#soundOn_Value#">
    </td>
    </tr>
    </table>
    <input type="submit" name="btnEdit_OK" value=" OK ">
    <input type="submit" name="btnEdit_Cancel"
    value="Cancel">
    </form>
    </cfoutput>
    </body>
    </html>
    It still isn't changing the db record though. here is the
    rest of the code:
    INDEX PAGE:
    <cfquery name="soundRecord" dataSource="csee"
    maxRows=1>
    SELECT sound.soundOn AS ViewField1, sound.ID AS ID_Field
    FROM sound
    <cfif isDefined ("URL.RecordID")>
    WHERE sound.ID = #URL.RecordID#
    </cfif>
    </cfquery>
    <html>
    <head>
    <title>sound - View Record</title>
    </head>
    <body bgcolor="#FFFFFF">
    <cfoutput query="soundRecord">
    <table>
    <tr>
    <td width="66" align="left" valign="top"> <font
    size="2" face="Verdana, Arial, Helvetica, sans-serif">Sound
    is:</font></td>
    <td width="114" align="left" valign="top"><font
    size="2" face="Verdana, Arial, Helvetica, sans-serif"><cfif
    ViewField1 eq
    0>off<cfelse>on</cfif></font></td>
    </tr>
    <tr>
    <td colspan="2" align="left" valign="top"><form
    action="sound_RecordAction.cfm" method="post">
    <input type="hidden" name="RecordID"
    value="#ID_Field#">
    <input type="submit" name="btnView_Edit" value=" Turn
    sound off ">
    </form></td>
    </tr>
    </table>
    </cfoutput>
    </body>
    </html>
    And action page:
    <cfif isDefined("Form.btnEdit_OK")>
    <cfif isDefined("Form.RecordID")>
    <cfparam name="form.soundOn" default="0">
    <cfquery datasource="#sitedatasource#"
    username="#siteUserID#" password="#sitePassword#">
    UPDATE sound
    SET soundOn = <cfqueryparam value="#form.soundOn#"
    cfsqltype="cf_sql_bit">
    WHERE ID = <cfqueryparam value="#form.RecordID#"
    cfsqltype="cf_sql_integer">
    </cfquery>
    <cflocation
    url="sound_RecordView.cfm?RecordID=#Form.RecordID#">
    </cfif></cfif>
    The first code is page 2, the edit page. Don't know why it
    isn't changing the DB record.
    Phoenix

  • Changing a select list using javascript

    Hi all,
    yesterday I had a doubt using apex_item.checkbox and how to change them using javascript:
    Re: Passing a checkbox as a parameter to a javascript function
    Today, I'm facing a similar problem, but with select lists. Here it goes. I have a report with apex_items, like this:
    select
    apex_item.checkbox(1,"ID",NULL,NULL,NULL,'f01_#ROWNUM#') " ",
    apex_item.select_list_from_lov(2,"SW_STATUS",'F2010051_SET_STATUS','onChange="setItems(''f01_#ROWNUM#'',''f03_#ROWNUM@'')"','NO') sTATUS,
    apex_item.select_list_from_lov(3,"REVISIO",'F2010051_SET_REVISIO',NULL,'NO','f04_#ROWNUM#') "REVISIO"
    from Fx1_vThe javascript code is as follows:
    <script type="text/javascript">
    function setItems(cb,estat){
      elem = $x(cb);
      alert(elem.value);
      $x(cb).checked = true;
      elem2 = $x(estat);
      alert(elem2.value); 
    </script>The idea is that everytime the item g_f02 (a select list) changes, calls the JS function with two parameters: a checkbox (g_f01) and another select list (g_f03). The function should change the items to a defined values. The checkbox changes ok thanks to the help I got yesterday, but I can't work with the third item (select list g_f03). When I try to show the value, it says "undefined".
    how could I see the actual value of the select list LOV and change it to 1, for example?
    Thank you very much, any help will be appreciated!!!
    Edited by: Elena.mtc on 19-may-2011 8:11

    Hi,
    Do you have typo in query?
    Should it be
    select
    apex_item.checkbox(1,"ID",NULL,NULL,NULL,'f01_#ROWNUM#') " ",
    apex_item.select_list_from_lov(2,"SW_STATUS",'F2010051_SET_STATUS','onChange="setItems(''f01_#ROWNUM#'',''f03_#ROWNUM#'')"','NO') sTATUS,
    apex_item.select_list_from_lov(3,"REVISIO",'F2010051_SET_REVISIO',NULL,'NO','f04_#ROWNUM#') "REVISIO"
    from Fx1_vAnd JavaScript
    <script type="text/javascript">
    function setItems(cb,estat){
      elem = $x(cb);
      alert(elem.value);
      $x(cb).checked = true;
      elem2 = $x(estat);
      alert(elem2.value); 
      $s(elem2,1); // $s function is for changing item value
    </script>Regards,
    Jari

  • Change value of a typedef in parallels to another running action

    Hello,
    Well, I have a problem with my VI.
    To summarize I use a Vi « IdsVg.vi » to achieve some measurements process.
    This one uses an action engine as a sub-vi to store data of the front panel and to precede complementary actions. The front panel is a strict typedef…
    I programmed the Vi avoiding to use sequence structures in order to be able to do other actions on the front panel in parallels. Nevertheless I’m running out of ideas for solving my problem.
    The problem:
    I would like to change values (time constant, Boolean of graph) of the front panel at any instant when the main vi is running. The actual problem is: when I start the program, using register event I can change values of the front panel, but when the program is running the while loop in which it gets the measurement, it isn’t possible to change parameter of the front panel…  
    Is there a solution or a trick??
    Thank you for help
    Attachments:
    MyProblem.lvproj ‏10 KB

    Putting in the project file does not help much, good try though. The actual files are missing though, so nothing shows up.
    I suggest you create a separate producer consumer loop in your main vi. The vi retrieving the data could pass the relevant data (producer) and the consumer loop will then process the data and update the fron tpannel. Note, only the producer consumer loop will update the front pannel.
    You would not need a sequence structure to control the update. The producer consumer loop will only execute when you provide the necessary data.

Maybe you are looking for