Bug?: Tabular Form function "addRow" can't handle multi-line Row Templates

Hi all,
i created a custom Report Template (Named Column Row Template) which creates 2 lines per Record (which in fact is 2 rows in a HTML table).
In the APEX function initTabForm (apex_4_0.js) the sample row (f01_0000) is read and stored in gTabFormInitRow
This is done by using a jQuery Selector like this: jQuery('#init_row_'+pRegionID) which returns only the first row of my multiline record.
Is this behaviour intended or is it a bug? Or do i have to change my HTML structure?
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at
Training: http://www.click-click.at/apex-4-0-workshops

Hi Marc,
thanks for the quick reply.
I was afraid you would say it is intended behavior :-)
A table per row has the disadvantage of loosing the automatic column width, i would have to set the column width to a fixed value to maintain a nice look.
Well, thanks for the moment, i'll try to find a general solution and (if i succeed) get back to you.
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at
Training: http://www.click-click.at/apex-4-0-workshops

Similar Messages

  • Select item on a Tabular form with a different dynamic LOV on each row

    I would like to use a tabular form where one of the columns is a dynamic LOV based Select, and where that dynamic LOV refers to one of the column values on each row.
    So if the tabular form represented a list of teams and the LOV-based Select column was the current team leader, I would want that select list to be populated only with the members of that team (different for each row). Since the list of team members is in some other table (all_players or something) I would want to populate the LOV with a query with a where clause that selected only those players records with a team-membership equal to the current tabular form's team id. So, on each row that select list's contents would be different.
    -- Justin

    I'm beating a dead horse here but I did get something to work with "less" code. My current needs do not require me to cascade drop downs, I only want 1. You can use the query like the in the first reply (but I don't have a table with joins) I created a simple two column table dept_emp with 4 records 10,null 20,null .... I want to fill the nulls with an employee but ONLY an employee that matches the dept. (Same concept of team leader and members).
    Here's the query:
    select apex_item.display_and_save(1,dept) dept,
    apex_item.select_list_from_query(2, name, 'select ename from emp where deptno='||dept) name
    from dept_emp
    I removed the code that was there already (ApplyMRU) and just put in this code:
    BEGIN
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    UPDATE dept_emp
    SET
    name=HTMLDB_APPLICATION.G_F02(i)
    WHERE dept=to_number(HTMLDB_APPLICATION.G_F01(i));
    END LOOP;
    END;
    The G_F01 matches the column 1 and so forth. There's more documentation but little explanation at:
    http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/api.htm#sthref2171
    The thing I could not get to work was a dynamic message
    #MRU_COUNT# row(s) updated, #MRI_COUNT# row(s) inserted.
    Not sure when the MRU_COUNT gets populated (probably in the routine I removed ;))
    You're probably way past me by now but I like to have as little code as possible when it comes to maintaining an app. That's why I liked oracle forms so much. This kind of stuff was pretty easy to do.
    Thanks again everybody!

  • Bug in Tabular form Not Exist Validation, fails when creating multiple rows

    Hi,
    I have a Not Exist validation created for a Tabular form:
       select 1 from my_table where col1 = :col1 and col2 = :col2Execution State: For created and Modified Rows
    which is working fine when a row already there in DB
    and I am trying to enter a new row with same data.
    but when there's no data and I enter two rows with same data, validation does not fire, first row should allowed to enter
    but for second row it should give error that data already exists, which is not happening.
    for example,
    let's say I have a row in DB with: 1, 2, 3
    when I try to add a new row with same data ie. 1, 2, 3 validation fires and showing error, which is fine.
    but let's say there's no data in DB and I am entering two rows with:
    1, 2, 3
    1, 2, 3
    validation is not working this time, it is allowing to enter both the rows.
    do I need to create a manual validation for this or what?
    Apex 4.1.1.00.23
    Regards,
    Tauceef
    Edited by: Tauceef on Dec 6, 2012 10:09 AM
    Edited by: Tauceef on Dec 6, 2012 11:22 AM
    Edited by: Tauceef on Dec 6, 2012 11:27 AM

    Hello Tauceef,
    >> Now I got it, I was under impression that it will validate one by one row before insertion,
    >> but it's going to check all the rows first, then do the insertion.
    Just to clear things up, the APEX engine works exactly as you describe, but this is your problem.
    The APEX engine do check\validate all the rows first, one row at a time, and only if all the rows pass validation, the DML processes kick in. The DML processes work on the entire Tabular Form record set (per page view, of course).
    In order for your type of validation to work (the one that queries the database), as you want it, the validation and DML actions have to run together, row by row. This is not how things work, because it’s less efficient/optimal, and may lead to a situation where a certain row can fail validation, but other row(s) already been inserted/updated/deleted into/from the database. This could be a very tricky situation.
    Vikram has suggested to rely on a database constraint, and control the APEX error message. This is possible, although I’m not sure that in this case, the Tabular Form will retain all the user changes, in case of validation error. You should check it.
    Another option, which Marc hinted on, is to manipulate the G_Fxx arrays. In your case, you should loop through the new rows, compute their MD5, and make sure that all the rows have different MD5 values. This is on top of the current validation, which makes sure that the new rows do not already exist in the database.
    Regards,
    Arie.
    ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    ♦ Author of Oracle Application Express 3.2 – The Essentials and More

  • Conditionally highlight a column in a tabular form. How can this be done ?

    Hi,
    I am making a timesheet application where the rows are activities and the columns are the days of the month.
    Now I want to give the background of the weekend-days a different color. In the header of the column we have mon,tue,wed etc.
    So the color has to be changed conditionally (i.e. when the columnheader is sat or sun).
    How can I do this ? Probably it can be done using javascript, but I don't know how and where. I hope somebody can help me.
    We are using Apex 4.01. I also looked at the new option of dynamic actions, but can not find the appropiate event (page load?) and condition.
    Any help is appreciated.
    Rob

    >
    The detail part is a tabular form. (this is the part where I want to add the background or highlight).
    I use theme 16. Dark blue. Everything still 'out-of-the-box'.
    >
    OK. Take a look at using a custom report template with conditional column templates, or a custom named column template.
    To start with a custom report template with conditional column templates, make a copy of the theme 16 report template the detail form is currently using. Switch the form to use the new report template. Modify the new report template to use conditional columns.
    A custo named column template is more complex as none are provided out-of-the-box, so it has to be started from scratch.

  • HTMLDB 2.0 bug - tabular forms - select list from named LOV

    Hi!
    Changing a column in a tabular form to 'select list (named lov)' gets the following error in HTMLDB 2.0 when you try to add a row (to an empty table in my case):
    PL/SQL error at column 133.
    Create a table and then create a tabular form on it. Then change a report column to be a 'select list (named lov)'. Save and run the form and the error occurs.
    Thanks!
    Dave Venus

    Brian,
    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
    -------------------------------------------------------------------

  • Tabular Form - Setting a default value just on first row.

    Hi all,
    how to set a tabular form default value only in the first row?
    When I click on "add row" I want the new row have a blank value.
    Thanks in advance.

    Hi,
    When you add a new row to the tabular form, any existing rows should be saved to the database. You can, therefore, check for the existence of such records and set the value of a hidden page item accordingly. The default value for a tabular form item can then be based on this hidden item.
    This can be done by setting the Source Used to "Always, ..." on the hidden item called, say, P1_DEPTNO_DEFAULT, and the Source to something like:
    DECLARE
    X NUMBER;
    BEGIN
    SELECT COUNT(*) INTO X FROM EMP WHERE DEPTNO = :P1_DEPTNO;
    IF X > 0 THEN
      RETURN '';
    ELSE
      RETURN :P1_DEPTNO;
    END IF;
    END;This is a "PL/SQL Function Body" Source Type.
    In this example, we are checking if there are any EMP records with a DEPTNO value that matches P1_DEPTNO. If there are, then the tabular form must contain at least one row already, so we return an empty string. If there are no records, the tabular form must be empty, so we return the P1_DEPTNO value.
    The Default settings on the DEPTNO column in the tabular form would then be:
    Default Type: Item (application or page item name)
    Default: P1_DEPTNO_DEFAULT
    Andy

  • In tabular form, is there a way to select one row as the default row?

    Hi, I have a tabular form which lists the many addresses that a fisherman may have. The query is: select default_addr_flag, addr1, addr2, city, state, zip from addresses where fisher_id = :PXX_fisher_id.
    I would like to have them set the default_addr_flag = 'Y' for ONLY ONE record....so even if they have many addresses, one must be selected as the default for any correspondence.
    Are there any examples, or does anyone have a suggestion. thank you!
    karen

    Hi Karen,
    I think first of all you should get yourself a browser and add-ons that allow you to inspect the HTML DOM elements. E.g. FF/Firebug/Error Console. Once you have the required tools you will be able to see for yourself what the DOM has, and then work out what you need to do.
    Most members, including myself, at times post solutions without really trying them out as they appear to be "obvious" even when they are not.
    Taking forward from the point where you have made the default address indication a "simple checkbox" from the Report Attributes tab, if you inspect the checkbox element you will find that it is somewhat more complex and Apex has created the elements with some JS code. E.g. this is a snippet from one of my application pages.
    <td headers="IS_CUSTOMER">
    <label class="hideMeButHearMe" for="f08_0001">Is Customer</label>
    <input type="checkbox" onclick="if (this.checked) {apex.jQuery('#f08_0001').val('Y');} else {apex.jQuery('#f08_0001').val('');}" id="f08_0001_01" checked="checked" value="Y" name="f08_NOSUBMIT" autocomplete="off">
    <input type="hidden" id="f08_0001" value="Y" name="f08" autocomplete="off">
    </td>You will see that
    a.Apex has created a onclick event trigger
    b. If sets the value of Unchecked checkbox to null ("").
    c. In my page the checkbox maps to f08, you need to see which item it maps to in your page.
    d. The id of the rendered checkbox is id of hidden element + _01.
    The consequence of this is that if you define a onclick trigger in the Element attributes it overrides and suppresses Apex from inserting its own JS code!
    To be able to uncheck all checkboxes other than the one the user has currently checked you will need to do this:
    i. In the Column's Element Attributes field write onclick="doDftAddr(this);"You could name the function the way you want it, this is an example.
    ii.In the Page HTML Header write
    <script type="text/javascript">
    function doDftAddr(pThis) {
      va = pThis.id.split("_");
      var vb = va[0]+'_'+va[1];
    if (pThis.checked) {
        vy = 'input:checked[id^="'+va[0]+'_"]'
        $("["+vy+"]").attr("checked",false);
        apex.jQuery("["+vy+"]").val('N');
        apex.jQuery('['+'input:hidden[id^="'+va[0]+'"_]'+']').val('N');
        apex.jQuery('#'+pThis.id).attr("checked",true);
        apex.jQuery('#'+pThis.id).val("Y");
        apex.jQuery('#'+vb).val('Y');
       } else {
        apex.jQuery('#'+vb).val('N');
    </script>Cheers,

  • Dynamic Action on tabular form: to auto set value for all changes rows

    Hi All:
    I am using APEX4.2.3 and I am not very familar with JQUERY or Javascript.
    I am having a tabular form to support Update and Delete action. The tabular form has 4 columns:
    Column A: ID                      (Number)     : Read-only column
    column B: Name                 (Varchar2)   : Editable
    Column C: Age                    (Number)     : Editable
    Column D: ChangeFlag      (Varchar2)   : Read-only column                             ==> however, I want this column been automatically upldated by my APEX application
    Here is the requirement: First user update Column B, or C or both for # of rows; then user click "Save Change" button. For ALL updated rows, I need to automatically update Column D with below logic:
    For a given row,
                   IF Column D IS NULL  THEN
                         set value = 'M'                           -- M means modified
                   ELSE --- column D has a value already
                        IF last character of Column D is 'M', THEN
                               don't do anything;
                        ELSE
                              set value of D = existing value + 'M'                       (here + means concatenate
                       END IF;
                END IF;
    I thought this can be done by creating dynamic action on tabular form ... I have researched this on this forum and can't find a good match example ..
    I know I can implement this using a DB trigger; however, I want to learn if this can be achived via Dynamic Action.
    Thanks!
    Kevin

    Hi Expert:
    Anyone can offer any direction or help on this?
    Thanks!
    Kevin

  • Update primary key with a tabular form based on a select list for each row

    Hello!
    I've two tables: Table1 with only one column (primary key) is a foreign key for table2.column1 (primary key). There is also a second primary key column in table2.
    Now I want to change the primary key values in table2.column1 with a tabular form (MRU) based on a select list (LOV based on table1.column1) for each row.
    The user should be able to choose for every row a new value from the select list to change the old primary key value at this position.
    How can I do this with ApEx?
    I've the tabular form and so on, but at the moment I get the following error:
    "Error in mru internal routine: ORA-20001: Fehler in MRU: row= 1, ORA-20001: ORA-20001: Die aktuelle Version der Daten in der Datenbank wurde geändert, seit der Benutzer einen Update-Prozess eingeleitet hat. ..."
    Thank you for your support!
    Kay

    Hello!
    I've two tables: Table1 with only one column (primary key) is a foreign key for table2.column1 (primary key). There is also a second primary key column in table2.
    Now I want to change the primary key values in table2.column1 with a tabular form (MRU) based on a select list (LOV based on table1.column1) for each row.
    The user should be able to choose for every row a new value from the select list to change the old primary key value at this position.
    How can I do this with ApEx?
    I've the tabular form and so on, but at the moment I get the following error:
    "Error in mru internal routine: ORA-20001: Fehler in MRU: row= 1, ORA-20001: ORA-20001: Die aktuelle Version der Daten in der Datenbank wurde geändert, seit der Benutzer einen Update-Prozess eingeleitet hat. ..."
    Thank you for your support!
    Kay

  • Tabular form loses data on validation check and new row

    When you add new rows inside a tabular form and you have a validation which troughs out an error then all data inside the new rows are lost.
    Is there any workaround available?
    Tobias
    Edited by: Tobias Arnhold on Jun 29, 2012 12:48 PM
    I forgot to tell:
    Current version of APEX 4.0.2
    I also get this firebug error: uncaught exception: Syntax error, unrecognized expression: #
    Somebody else had this issue before too: APEX 4.0  Tabular Form - Javascript error due to validation
    Is there any workaround available?

    Yeah, you cannot validate on tabular forms so you pretty much have to find work-arounds in order to validate your information. When you create an LOV you can create it with a dynamic query which is the basis for your select list. You can just modify the query in the dynamic query to include a where clause. The where clause could then just state 'where EMP_ID2 <> EMP_ID1'. That way your select list for each row should not have matching values between EMP_ID1 and EMP_ID2. APEX can create the dynamic query for you, you just select the columns you want to base the LOV on, then modify the query after.

  • How can we handle Dead lines

    Hi friends,
       When a work item is created. The User hasn't Approved / Rejected  (hasnt taken any Action on that workflow) for 2 days, 4 days and 6 days an Escalation mail has to sent to respective concerend persons.
    How can we handle this. The holidays are only Saturday and Sunday.
    Client doesnt want to consider the factory calender.
    Please suggest me step by step
    Thanks in Advance
    Ganesh

    You need to make use of "Modelled Deadline Monitoring" to achieve ur requirement.
    Trust me... Search this forum and you will find answer how to make use of different steps to achieve it....
    Regards,
    PR.

  • [iPhone] Can UIButtons have multi-line titles?

    I can't seem to find a way to get my UIButtons to have multi-line titles. I've tried setting their UILineBreakMode properties, but all that does is affect what gets displayed on the button's first line and doesn't make a (much-desired) second line. Any ideas?

    Did you ever find a solution to this? I need to do the same thing.
    I've tried the following with no luck:
    UIButton* nowPlayingButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage* nowPlayingImage = [UIImage imageNamed:@"NowPlaying.png"];
    [nowPlayingButton setFrame:CGRectMake(0, 0, nowPlayingImage.size.width, nowPlayingImage.size.height)];
    [nowPlayingButton setTitle:@"Now Playing" forState:UIControlStateNormal];
    [nowPlayingButton setFont:[UIFont fontWithName:@"Arial" size: 12]];
    [nowPlayingButton setContentVerticalAlignment:UIControlContentVerticalAlignmentTop];
    [nowPlayingButton setLineBreakMode:UILineBreakModeWordWrap];
    [nowPlayingButton setBackgroundImage:nowPlayingImage forState:UIControlStateNormal];
    -- Jason
    Message was edited by: jsm174

  • Computer can't handle multi cam?

    I am new to Premiere Pro CC, I have only been using it almost two days. I come from years of Final Cut Pro. Here is the issue:
         If I have 8 high quality camera takes, like a music video, and I want to edit it by doing it with multi-cam, obviously, even though I have a powerful computer, it's not powerful enough to handle 8 camera's of really large footage.
         Now, in Final Cut Pro X, this was easy. All I had to do was select the files I wanted in multi-cam and click, "Create Proxy Media," then I had to click, "Play proxy media and not original," in preferences. I edited the video, then when I was finished and wanted to export, all I had to do was go back to the preferences, uncheck, "Play proxy media," and the multi-cam would automatically now be switched to the original media, not the proxy media. Thus, exporting the high quality files.
        I have looked at tutorials and around the internet, I cannot find how to go about this in Premiere Pro CC. I know how to create the multi cam in Premiere Pro CC but as I said, I'm not going to be able to play it back.
         So, how do I create small play back footage such as proxies, and then turn that off when I'm ready to export and have it replaced with the original footage?

    yes, you can try to relink to the originals when time to export. most of the time it will relink fine, but once in a while it goes haywire. the relink doesn't work when swapping out certain different media types, so best to test it all out first before getting stuck with a bad relink after editing is done.
    using preview renders is limited, if you apply any effects to the footage it will have to make new preview renders, vs applying effects to a proxy file that wont need to be re-rendered. so its sorta easier just to do it once as proxy and not have to fight preview renders, or worry about the lost preview render bugs.

  • Tabular form, dynamic select list

    Hi,
    Direction as to how to tackle this problem politely requested please:
    I have a "choices" table of three columns. Sample data shown below:
    col1 col2 col3
    a b c
    a b d
    a b e
    f g h
    f g i
    The plan is to show these "choices" as a tabular form. With the example data shown above, this
    would be shown as a two row grid, with the first row showing "a b" and at the end of the row there
    would be a select box showing four possibilities: "c", "d", "e" or blank.
    The "blank" meaning "no choice".
    The second row would show "f g" and a select box for "h", "i" or "blank".
    Neither the first two columns are editable by the end user - they just get to alter the third column.
    How would I go about building this? Would it be a Report with a fancy piece of html for column three,
    or perhaps a tabular form?
    There can be more than two rows on the screen (of course) - beyond the sample data.
    Any directional help appreciated; thanks in advance.
    Mungo

    Hi Jure,
    On reflection, that mention of the "stragg" function was very useful.
    My first reply to you was a little uncharitable, for which I apologise.
    Tom Kyte seems to have moved away from the "stragg" function and
    has used "sys_connect_by_path" instead.
    See http://tkyte.blogspot.com/2007/03/stringing-them-up.html
    Once all that is in place (tested out via SQL Developer - not even a mention of Apex) it
    seems relatively straightforward to integrate this into an Apex region.
    Thanks again.
    Mungo

  • 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

Maybe you are looking for

  • HTTP sender adapter's response

    Hi All, I have configured a HTTP to Proxy Scenario, in which when a SMS is received by CAD application, the application extracts data from SMS and convert it into url and hit XI server using POST method. When CAD team tries to hit XI server using the

  • Issue with templates and updating .html pages in my website

    Hello, I have taken over updating a website for the charity I work for. I have updated some eleements of the .dwt template page, however it does not seem to be updating the other .html pages for the website. I do not get the update pages box just a b

  • Publishing forms online

    If I've created a fillable form pdf, what is the best way to publish the form online? I'm using Adobe Acrobat 7.0 Professional and am wondering if I need a different program, such as LiveCycle to get the form online.  I see how you can distribute the

  • InDesign5.5 seems to have switched to demo mode, what now?

    CS5.5 InD stopped functioning on laptop but works fine on desktop. Can open, use it fine but will not save file (nor "save as" or export). Other CS software OK on both platforms. Reinstalled InD but still no good. Seems like it's in demo mode but why

  • Upgrade status

    Please tell us if you have received our payment for the upgrade.