Apex_item.text dynamic item add or subtract value

I have a report that creates dynamic items using the package apex_item, like this:
select id
,      apex_item.hidden(1,id) 
,      label
,          decode(typ_id,
                    1, apex_item.text(p_idx=> 2, p_value=> null, p_attributes=> 'class="number"') || 'num', /*this should be a numberic field, isn't working jet*/
                    2, apex_item.text(2),
                    3, apex_item.select_list_from_query(p_idx=> 2, p_query=> 'select label, id from list where prop_id = ' || id, p_show_null=> 'NO'),
                    4, apex_item.date_popup(2, 0),
                    5, apex_item.text(2,'0') || '<a href="f?p=&APP_ID.:1:&SESSION."><img src="#WORKSPACE_IMAGES#add.gif"/></a> <a href="f?p=&APP_ID.:1:&SESSION."><img src="#WORKSPACE_IMAGES#substract.gif"/></a>',
                    descr
               ) value
from properties 
order by id
In the latter type of element (where typ_id is 5) I want to have a textfield allowing only numberic values. If the user clicks on the image "add.gif" the value of the element must be added by 1, and when the user clicks on 'substract.gif' value must be lowerd by 1. How can I make this work? The images can be replaced by another element, if necessary.

Hi Mir,

My apologies for the restructuring of the query using case. I hope this would help you. The code could be much simpler if you could take the JS logic to a JS function on the page.

http://Apex.Oracle.com/pls/Apex/f?p=44973:2

See you soon
Ligon
PS: The code for formatting here has been driving me crazy so I have to put it in a page to show you :)

Tags: Database

Similar Questions

  • How to add the default value for the "Full - Text Search" box

    Hi all

    I am looking for the ability to add a default value for the "Full text search" box in the search form.

    Example:

    When the user accesses the search page it get default values for some fields (defined in the rule as default values) such as

    xField1 = txt1 and xFiel2 = txt2.

    and Furthermore we need full-text = Hello world.

    Is this possible?

    Another way that we use is to open the search by URL with coreContentOnly = 1 as a form:

    http:// < Server >/cs/idcplg? IdcService = GET_DOC_PAGE & to Action = GetTemplatePage & to Page = STANDARD_QUERY_PAGE & coreContentOnly = 1 & to xField1 = txt1 & to xFiel2 = txt2

    It is possible to add full-text criteria here? Somethig like: & text = Hello World

    Thank you

    Leon

    It is not possible in a very obvious way, not to mention that it is a rather strange request.  I can't really imagine a realistic use for this case.

    Anyway, without a messy customization, you should provide a default query with an FTX inside element text setting (i.e. "IdcService = GET_DOC_PAGE & Action = GetTemplatePage & Page = STANDARD_QUERY_PAGE & QueryText =Hello World" "")

    To do this in a profile in the secondary effects of the profile section, add the following:

    <$dpPromote("QueryText",>Hello everyone") $>.

  • Align the value apex_item.text

    How can I align the value apex_item.text on the right?
    The default value is left.
    I tried to set the alignment of the column as rigth without success.

    Use the p_attributes for apex_item.text parameter to create a style attribute:

    style="text-align: right;"
    
  • How to add the full value of two buttons?

    How to add the full value of two buttons (any key) VI and display it in the output text box? I am attaching a sample program, but I know that his evil... Help, please

    Try this

  • How to use PL/SQL to create dynamic action to set the value of a selection by another list?

    Hello

    I would like to know how to use PL/SQL to create dynamic action to set the value of a list of selection by another selection list.

    1.PNG

    I wish can create dynamic action to manage the two above the Room select list (: P9_ROOM) and building (: P8_BUILDING).

    When you select "1074" in the bathroom, building highlights like "BRM BLD 5"

    When you select 'Area of the black box' in the room, building must assign the value "7 BLD BRM"

    When the room is Null, building should also be Null.

    I thank you,

    Alice

    I forgot to mention, for the PL/SQL Code, because you are working with items in the selection list, the return values are different from the display on your LOV values, you must instead use the return values.

    Thank you

    Erick

  • How to 'catch' the data in a field of apex_item.text

    Hello

    How can I catch the data, I write in a field of apex_item.text and copy it to another table.

    Example:

    Source table

    Create table Hund(
    PRI_KEY number,
    Name varchar2(30)
    );
    
    

    Classic report in the Apex:

    Select
    APEX_ITEM.DISPLAY_AND_SAVE(1, PRI_KEY),
    APEX_ITEM.DISPLAY_AND_SAVE(2,Name),
    APEX_ITEM.TEXT(3,weight) as weight
    From Hund;
    
    

    The weight of the column do not exist in the table Hund, but is it possible to catch what is written in the Apex Page (and put in another table)?

    EDIT: Maybe a resolution with a Collection of APEX?

    THX

    René

    René

    F01 being a checkbox only lines checked are in the table.

    This means that when the box is checked for lines 1 and 3. Only the rows are in the table in the f01.

    Then, when for the second race hollow the loop index is 2. You treat rank 3 for the f01 table but the 2nd rank of the other tables.

    You have to match the table value f03 with f01 table values to find the line number for the f20 table.

    for i in 1..apex_application.g_f03.count
    loop
       for k in 1..apex_application.g_f01.count
       loop
          if apex_application.g_f03(i) = apex_application.g_f01(k)
          then
             UPDATE PRM_CHK_BSTBS_ABGL_EDIT
             SET KOMMENTAR=APEX_APPLICATION.G_F20(i)
             WHERE NUMMER_EINHEITLICH=to_number(APEX_APPLICATION.G_F03(i));
           end  if;
       end loop;
    end loop;
    

    This will update the checked lines.

    If you want to update all the lines to leave out the inner loop and instruction.

    I don't see what you posted I have, this is the case, but it is not a good idea to mix apex_item and columns be updated regular.

    Nicolette

  • the SQL for apex 4.2 with 'apex_item.text' region report renders incorrectly

    In the APEX 4.2 page, I created region "report data.

    Type = "SQl query".

    'User interface'-> 'Template '=' area of reports.

    "Area Source 'is' select apex_item.text (1, '111') as double c1".
    The select query is actually much more complex, but generally simplified it is such, that it uses the function "select apex_item.text" construction HTML textfield.

    If I run in query Sql Developer
    select apex_item.text(1, '111') as c1 from dual;
    Then it results in:
    <input type="text" name="f01" size="20" maxlength="2000" value="111"  />
    But in APEX 4.2 the report is rendered thus:
    <td  headers="c1">&lt ;input type=&quot ;text&quot ; name=&quot;f01&quot; size=&quot;20&quot; maxlength=&quot;2000&quot; value=&quot;111&quot;  /&gt ;</td>
    ("for this forum poster correctly I had to put extra spaces between ' ' & gt ' and ';' and so on)

    And APEX 4.2 shows ugly html inside the cell of report/slot for me, showing characters/symbols ">". The reason is that APEX source HTML of the page has no symbol ">" but has "' & gt; '."

    The APEX 3 I have a similar query works fine, without such an anomaly.

    What attribute should I change in APEX 4.2 region to display the result of my query as needed?

    I need this 'apex_item.text' function, I can't remove it.

    Published by: CharlesRoos on 13.02.2013 15:28

    Published by: CharlesRoos on 13.02.2013 15:29

    Published by: CharlesRoos on 13.02.2013 15:29

    CharlesRoos wrote:
    In the APEX 4.2 page, I created region "report data.

    Type = "SQl query".

    ' UI '-->' model '=' area of reports.

    "Area Source 'is' select apex_item.text (1, '111') as double c1".
    The select query is actually much more complex, but generally simplified it is such, that it uses the function "select apex_item.text" construction HTML textfield.

    If I run in query Sql Developer

    select apex_item.text(1, '111') as c1 from dual;
    

    Then it results in:

    
    

    But in APEX 4.2 the report is rendered thus:

    < ;input type=" ;text" ; name="f01" size="20" maxlength="2000" value="111"  /> ;
    

    ("for this forum poster correctly I had to put extra spaces between ' & gt' and ';' and so on)

    And APEX 4.2 shows ugly html inside the cell of report/slot for me, showing characters/symbols ">". The reason is that APEX source HTML of the page has no symbol ' > ' but '& gt;'.

    The APEX 3 I have a similar query works fine, without such an anomaly.

    What attribute should I change in APEX 4.2 region to display the result of my query as needed?

    Make sure the column attribute display as for column C1 is Standard report column.

  • Include the anchor and image with apex_item.text

    I wonder if it is possible to include an anchor and an image with the apex_item.text function. I tried to use the p_attributes parameter in the function, adding an anchor tag and tag the image. When I discovered the page, I can see the image and the link goes to the page I want, however, to the right of the image I see not what turns out to be my p_item_id parameter. In my case it appear on the page as a id = "f1_1" / > just to the right of the image.
    SELECT apex_item.text(1, ID, 15, 15,
               '<a href="f?p=&APP_ID.:23:&SESSION.::::P23_ID:#ID#" >
                 <img src="#IMAGE_PREFIX#e2.gif" border="0" ></a>',
               'f1_' || ROWNUM, null) ID,
    In addition, the #ID # point the value of the href above URL (f? p = & APP_ID.:23: & SESSION.: P23_ID: #ID #) does not pass the value of the element, rather it passes #ID # as value, any thoughts on how to pass the value of the line in a table would be greatly appreciated.

    Our version of the ApEx is 3.2.1.00.10

    Concerning
    Mark

    Published by: bohnensm on July 12, 2010 12:04

    Published by: bohnensm on July 12, 2010 12:05

    Mark,

    apex_item. Text renders a text field, you try to include your own HTML (image + anchor) code as an attribute of this text field. This will generate incorrect HTML code. Instead you can concatenate the string generated for the text with your HTML code field, i.e. move it out of the text field:

    SELECT Apex_item.text (1, ID, 15, 15, null, 'f1_' |) ROWNUM, null).
    '',
    « f1_ » || ROWNUM ID, null)...

    Kind regards
    Marc

  • to access the (f02, val) apex_item.text of javascript

    I'm not sure how to proceed or if its possible.

    I have a report that uses apex_item.text in it. I'll be back on the 15 lines.

    I want to be able to change the value in the area of apex_item.text with a javascript command. Here I have fall down otherwise where in the screen and I want to take this value and insert it into the apex_item.text box.

    If I do it in JavaScript using the $x('F02').value = newval; control box, it only changes the first in the. If I want to change the boxes of second or third how should reference them? they all have the same name "f02".

    I looked through the api and I don't see what I need, or I don't know what I should use.

    If it is possible to do? fill the text boxes in apex_items of javascript?

    Hello

    You can change your query to be something similar to the one below. In this example, the selection of the 'dept' list is transferred to the "emp" text box when dept selection is changed

    select apex_item.text(1,empno,null,null,null,'f01_'||rownum) emp ,apex_item.select_list(2,deptno,'10,20,30,40','onChange=$x("f01_'||rownum||'").value=this.value;','N')dept from emp
    

    CITY

  • Tabular of Autocomplete Ajax does not work in SQL query using apex_item.text.

    Hello

    Is it possible to use the search function that is used in, Dennis Kubicek example, section tabular ENAME of Autocomplete Ajax
    in a query sql using apex_items?

    Request line:
    apex_item.text (17, xp.part_nr, null, null,'onfocus = "f_register (this);) 'autocomplete 'off' = ') PART '.

    In a first time, I followed the example by adding «onfocus = "f_register (this);"autocomplete = "off" in the attributes of the element in the report field.»
    It did not work... so tried to add computers in the attirbutes of the apex_item parameter.
    But it still doesn't work. No errors are given, it does not.
    Could someone help me please?

    THX!
    Astrid

    Of course, it is. I just tested it in this example:

    http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:178

    with an element created using apex_item package and it works.

    If you have access to my Idée, you look at the source.

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • Cannot add or subtract from the choice of backup discs

    I can't find how to add or subtract from the disks to use for storing upOne of my disks (3) is complete and I want to use new selecta. the preferences window is not resized

    IN aid, he said:
    «If you already set up Time Machine, your backup disks are listed, and information on each disc of the backup is displayed.» To select, add, or remove backup disks, click Select Disk or add or remove the backup disc. »

    I don't see this option in preferences:

    Simon,

    Scroll down in the window pane to display the add/remove disk backup option:

  • How to change name (label) text dynamically in oracle forms

    My requirement is, I want to change the name of text dynamically in the form of oracle. How can do us?  (Not the label of the button (or) box... Looking for a title of text element...)

    Dear Sir

    You cannot change the properties of TEXT elements. Instead, you can use the TEXT_ITEM guests to display the legend.

    Manu.

  • Action Script to add a node value parent for the top node

    I need to add a new value of the node parent to a hierarchy to the top node.  The script parameters to add a node is "Add | Version | Hierarchy | Node | Parent Node. Property sheet. "  I am at a loss on what to do for the top node because there is no node Parent above this level, but the settings ask him.  I have reviewed the manual and the manual of admin, but did not help.  Can someone help me?

    Thank you!

    You have the answer with you, do not be confused between the Parent node and the top node context, when adding a new node, the node of your Top will become your Parent node.

    ' Add | Version | Hierarchy | Node | Parent Node. Property of the worksheet.

    If you're still confused, just do the following.

    1. right click on the node of your top and add a new worksheet or node branch manually

    2. Once added, go back to the homepage-> Script

    3. Select the Type of Source in the paper transactions, and then select the newly added node and load

    4. in the lower part select Script-> download-> Download Action Script.

    5. open in a Notepad and use to create your new script.

  • E-mail address embedded in Apex_Item.Text

    I use Apex 4.1 and a pl/sql generated region using htp.table and apex_item to create the elements on the page. I create an apex_item.text element that contains information, including an email address.

    Text contains information that is similar to "NAME: user name address: useraddress PHONE: 11111111 EMAIL: . [email protected] "" "

    We would like to , as the email address to be able to be clicked by the user and open outlook so that the user can send an email to the address of the link. The information contained in the text element is generated by a pl/sql cursor and I tried to integrate the < a href = "mailto:[email protected]" /a > in the slider, but that did not work and just showed the tag in the text box. ' "

    Any help/advice would be appreciated!

    Hello 77Vetter,

    Have you thought about going pure htp.p?

    Here's a simplified version region PLSQL of one of our applications that work e-mail links

    begin
    for x in (
    select
          w.cps,
          w.cpsemail,
          w.rsm,
          w.rsmemail,
      from #OWNER#.cp_projectsummary w
    where w.schemaname = :P10_SCHEMANAME
      and w.workorderkey = :P10_WORKORDERKEY
      and w.workordercustomerkey = :P10_CUSTOMER
    )
    loop
      htp.p('
    CPS: '||x.cps||' '||x.cpsemail||'
    RSM: '||x.rsm||' '||x.rsmemail||'
    ' ); end loop; end;

    Kind regards

    Brad

  • Problem with 'Add a new value' component functionality

    Hi all

    I'm having a problem with the component feature 'add a new value '.  The component is designed to add an instructor for the purposes of accreditation.  When a new teacher is added using the component, it is added to a table for certification.  The search folder search this table allowing the user to update an existing record of instructor. Add the search folder for the component is a view of PS_PERSONAL_VW, which excludes the entries in the table of accreditation.  The only key to scroll 0 is emplid accreditation file. When an attempt is made to add a new employee, I get the error - "the value that you have tried to add already exists. Please specify a new value in the above fields. ", despite the fact that the selected employee was not added and is not in the table of accreditation.

    Someone has an idea of what the problem is here?

    PTools Version: 8.53.08

    PS App Version: 9.0

    Oracle DB Version: 11.2.0.3

    Version of the operating system: Win7 64 bit

    Thanks in advance.

    Too bad! I thought about it. It was a problem with the quick table of the emplid field.

Maybe you are looking for

  • Stop up CPU and running custom.

    When I turn on my computer and it starts it runs very slowly for about 30 seconds. After that, it is not really do anything at all but run my first core at 100%, that no stop. I went and used a program to close all startup programs. It does not help

  • Y at - it sort of have sticky notes on several places that simply on the desktop?

    Forgive me if this isn't a Microsoft product, but it seems that it is. Apparently the only place you can have a post-it note is on the desk. How silly is that? Limiting in this way, it's like having post-it paper notes and only be able to have them o

  • I get the message that the NVIDIA graphics driver has a problem

    maintenance cleaning disc get the message that the NVIDIA graphics driver has a problem

  • Acrobat 10 and Yosemite

    Problem - my 10 Acrobat (to 6) does not work. Sequence of events - I have the Suite 6 and then downloaded CC for my business. After the challenges, I removed the cc apps. My own Acrobat stopped working (I had updated to Yosemite in the meantime). I t

  • Location of VMware - viclient.exe

    Due to a bug with the search function of the vSphere 5.0U1 customer, we would like to be able to edit the VMware.viclient.exe file.  Does anyone know where the location of the file is for the .exe?  We have upgraded only vCenter to date.  Using the W