Validation of line in a table

Hello

Can someone help me please

On the form of tables when the user clicks on several add lines. and enter the same values on all lines.

system must by a validation error when they click on the "submit" button.

Apex. Oracle.com

w/u/p: nani5048/test/test1

Thank you

Nani

Here's a thread to learn ORACLE APEX

Learn Oracle APEX

in any case, I added a unique validation date in your application in your workspace

see for yourself

Tags: Database

Similar Questions

  • How can I activate validations on columns in a table

    Hi all

    Background

    I have a tabular presentation, which consists of four columns. The form is based on a view.

    The four columns are: localID EXAMPLE 2 EXAMPLE 3 EXAMPLE 4

    There are three buttons. Submit, cancel and add the line

    I need to allow users to add and edit information from localID but users are not allowed to change the LocalID field.

    At first, I thought that it would be best to leave this field to display in text form but only when a user clicks on the add a line to the field LocalID is empty or null, said

    So I decided to leave this field as a texfield rather than "show as text (State stops or other)"

    I want a validation that invites an error message if a user changes an existing localID

    For example:

    The table gives the following results

    Charlie123 charles anderson 55

    Randall12 randall luzzi 20

    The user tries to send the current values of the localID change form

    123 charles anderson 55

    12 randall luzzi 20

    Any ideas of how I can do this?

    Thank you

    CharlieMack

    Hello

    The validation is triggered for each field in the column DEPTNO. Also for the new fields. If you are not allowed to transfer the column DEPTNO field at all.

    Your question, it turns out, is a rather difficult pickle. In short: there is, as far is I know, simple way to validate a column only for existing records, but not for new.

    My idea would be to take your little question and look at what you're trying to accomplish: stop the upgrade on a column, but allow insertions.

    Take a look at the table of the DEPT on your page 850. I added a dynamic action that defines all DEPTNO existing read-only, but leaves new lines as entrable.

    Alternatively, you can fill your LOCALID column by a trigger. This way you can set your column as diplay only (or not entrable) and it will always get a value.

    If you want to persist with leaving LOCALID as input fields and launch a validation error on submit, you will need at least a column more than you fill a trigger/sequence. You need something to uniquely identify each line as a reference to records in database.

    For the latter, I page 851, the configuration using the EMP table. Validation, each line is identified solely by the EMPNO column. If you change your ENAME, the record is put in correspondence with the value of database based on the EMPNO. If the EMPNO is null, obviously facing a new line, for which we allow an entry for the ENAME field.

    Note that adding an additional column is necessary to match each line with the existing values in the database, but requires a change to your datamodel.

    This choice I'll give to you

    Good luck with it.

    Kind regards

    Vincent

  • Newly added validation loop lines

    Hello dear livecycle fans!

    I think I looked everywhere for my fairly simple question. Here it is:

    I have a table with a header row and 1 row and a button of a new line (which adds a new line to the table) BUT I want the button to validate the last row (to check if everything is fullfilled). It can also validate all the lines, is irrelevant.

    My code looks like this:

    var valid = true;

    for (var i = 1; i < Table1.Row.instanceManager.count; i ++)
    {
    If (form1.page1.tabform.Table1.Row (i).field.rawValue == null |.) field.rawValue.length form1.page1.tabform.Table1.Row (i) == 0); {
    xfa.host.messageBox ("missing a field!");
    valid = false; }
    }

    Of course, when him valid = true, it adds the new line. However - this validation does not work
    Why is this? Would you be so kind and help me with one. The code seems simple and straightforward and I don't really know what I'm doing wrong.

    Thank you! PS. Wow, that the editor of this post is really messed up on Opera

    OK, I found this blog that answers all my questions:

    http://blogs.Adobe.com/formfeed/2008/11/loop_through_subform_instances.html

  • How to determine a specific line in the table clicked on

    Hello-

    I need to determine the specific line of a table control that is right-mouse-clicking.  I think that this is possible by using the context Menu Activation? event for the control of the table and get the vertical coordinate in the Coords filter options.

    He is performing experiments to determine the vertical amplitude of each row in the table, or maybe in determining the width of a line and using a linear relationship to determine the possible range of the following lines.  Do you feel it is the best strategy or is it maybe an another easier way to get this information?

    Thank you

    Don

    You can use the CtlRef with the Point in the array to the method line for the information.

    Ben64

    I was too slow to respond...

  • How to get rownum of the last line in a table?

    Hello

    I need to add a line slot-shaped table with the dynamic value.

    I add a line slot-shaped table with existing lines so I need to get a rownum of the last row of tabular presentation.

    I'm using a process like this:

    Declare

    l_value varchar2 (200);

    number of rownum_value;

    Begin

    l_value: = wwv_flow.g_x01;

    rownum_value : = wwv_flow.g_x02;

    HTP.p ("< class td =" child"> ');

    HTP.p (APEX_ITEM. DISPLAY_AND_SAVE (p_idx = > 3,

    p_value = > l_value,

    p_item_id = > 'f03_000 ' | ROWNUM_VALUE - here is Rownum value

    ));

    HTP.p ("< table > '");

    HTP.p ("< class td =" child"> ');

    HTP.p (to_date (sysdate));

    HTP.p ("< table > '");

    HTP.p ("< class td =" child"> ');

    HTP.p (APEX_ITEM. CHECKBOX2 (p_idx = > 5, p_value = > 'Y', p_item_id = > 'f05_000' |) ROWNUM_VALUE -here is Rownum value

                             ));

    HTP.p ("< table > '");

    And I use the dynamic action with Ajax to pass values to the process:

    (function () {}

    get var = new htmldb_Get (null, $v ('pFlowId'), 'APPLICATION_PROCESS is ADD_VALUE', $v ('pFlowStepId'));

    get.addParam ('x 01', $v ('P2_VALUE'));

    get.addParam ('x 02',SOME_ROWNUM_VALUE);  Here, I need to get the value of Rownum

    gReturn = get.get ();

    get = null;

    gReturn = (! gReturn)? ' null': gReturn;

    var table1 = document.getElementById ('tabform_TABLE');

    Table2 = table1.getElementsByClassName ("uReport") var [0];

    TBODY var = table2.tBodies [0];

    var row = document.createElement ("TR");

    row.innerHTML = gReturn;

    tbody.appendChild (row);

    })();

    How can I get a value of rownum in the last row of my tabular form?

    I prefer to use JavaScript, but any other solution would be much appreciated.

    I'm on Apex 4.2

    Thanks to you all.

    There are a few options

    Base Oracle: Number count of rows returned in the report of the APEX

    for example:

    $('#report_emp td[headers="ENAME"]').length

  • How to manage the lines multiple region table OFA

    Hi gurus,

    I'm new to the development of new Pages of the OFA. Please help me how to manage multiple lines in the table region OAF.

    My requirement I'm not able to manage multiple lines in my area of Table.

    First row in my table area I am selected date_start and date_end when I select the end_date I need I need difference bet ween dates.

    My problem is I am able to manage the first Table line but I am not able to manage the table still ranks when I fire that time I first get the rank only.

    POS:

    14/08/12 07:59:40 1

    14/08/12 07:59:40 inside

    14/08/12 07:59:40 date difference is 86400000

    14/08/12 07:59:40 date difference is 1

    14/08/12 07:59:40 date is less than 365

    14/08/12 07:59:57 1

    14/08/12 07:59:57 inside

    14/08/12 07:59:57 date difference is 86400000

    14/08/12 07:59:57 date difference is 1

    14/08/12 07:59:57 date is less than 365

    14/08/12 08:00:13 1

    14/08/12-08:00:13 inside

    14/08/12 08:00:13 date difference is 86400000

    14/08/12 08:00:13 date difference is 1

    14/08/12 08:00:13 date is less than 365

    My custom logic:

    If (DutDetSEndDat".equals (pageContext.getParameter (EVENT_PARAM))) {" "}
    DateDiff (pageContext, webBean);
    //Am = XxDutyTravelAMImpl
    //(XxDutyTravelAMImpl) pageContext.getApplicationModule (webBean);
    OAViewObject = oaviewobject1
    (OAViewObject) am.findViewObject ("XxDutyTravelDuDetEOVO1");

    System.out.println("1");
    If (oaviewobject1! = null) {}
    System.out.println ("Inside");
    oaviewobject1. Reset(); New line added
    oaviewobject1. Next(); new line added
    Line OARow = (OARow) oaviewobject1.getCurrentRow ();

    Date sDate = (Date) row.getAttribute ("DutdetStartDate");

    Date = eDate (Date) row.getAttribute ("DutdetEndDate");
    java.util.Date VChangeDateTime =
    new java.util.Date (sDate.timestampValue () .getTime ());

    If (sDate! = null & & eDate! = null) {}
    long m1 = sDate.timestampValue () .getTime ();
    long m2 = eDate.timestampValue () .getTime ();

    long diff = m2 - m1;
    System.out.println ("difference in date is" + diff);
    int diffDays = Math.round (diff / (24 * 60 * 60 * 1000));
    System.out.println ("difference in date is" + diffDays);
    If {(diffDays > 365)
    System.out.println ("Date is greater than 365");
    } else {}
    System.out.println ("Date is less than 365");
    }
    }
    }
    }

    Kind regards

    Srinivas

    Hi Srini,

    To get the event line descriptor that shot please use code below.

    If (DutDetSEndDat".equals (pageContext.getParameter (EVENT_PARAM))) {" "}
    DateDiff (pageContext, webBean);
    Am = XxDutyTravelAMImpl
    (XxDutyTravelAMImpl) pageContext.getApplicationModule (webBean);

    String rowRef = pageContext.getParameter (OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    OARow line = (OARow) am.findRowByRef (rowRef);

    Date sDate = (Date) row.getAttribute ("DutdetStartDate");

    Date = eDate (Date) row.getAttribute ("DutdetEndDate");
    java.util.Date VChangeDateTime =
    new java.util.Date (sDate.timestampValue () .getTime ());

    If (sDate! = null & eDate! = null) {}
    long m1 = sDate.timestampValue () .getTime ();
    long m2 = eDate.timestampValue () .getTime ();

    long diff = m2 - m1;
    System.out.println ("difference in date is" + diff);
    int diffDays = Math.round (diff / (24 * 60 * 60 * 1000));
    System.out.println ("difference in date is" + diffDays);
    If {(diffDays > 365)
    System.out.println ("Date is greater than 365");
    } else {}
    System.out.println ("Date is less than 365");
    }
    }
           
    }

    Thank you

    Vlaminck

  • Help to extract data Clob to a column in a table that has several lines in a table

    Help to extract data Clob to a column in a table that has several lines in a table

    It works for only the first line

    CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';

    Grant read, write on DIRECTORY XMLDIR to the public;

    () dbms_xslprocessor.clob2file

    beef in CLOB,

    XMLDIR IN VARCHAR2,

    "testfile2.txt" IN VARCHAR2);

    DECLARE

    buf CLOB.

    BEGIN

    SELECT H15_DOC

    IN buf

    OF H15TEST. H15_STAGE

    where rownum = 1;

    dbms_xslprocessor.clob2file (buf, 'XMLDIR', 'testfile2.txt');

    END;

    /

    -This error code

    CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';

    Grant read, write on DIRECTORY XMLDIR to the public;

    () dbms_xslprocessor.clob2file

    XData in CLOB,

    XMLDIR IN VARCHAR2,

    "testfile2.txt" IN VARCHAR2,

    CSID in NUMBER: = 0);

    DECLARE

    CURSOR xmlmycur IS SELECT H15_DOC

    OF H15TEST. H15_STAGE

    where rownum = 102140;

    l_clob CLOB.

    XData CLOB.

    BEGIN

    DBMS_LOB.CREATETEMPORARY (l_clob, true);

    DBMS_LOB.CREATETEMPORARY (xdata, true);

    OPEN xmlmycur.

    LOOP

    SEEK xmlmycur INTO xdata;

    dbms_xslprocessor.clob2file (xdata, 'XMLDIR', 'testfile2.txt');

    EXIT WHEN xmlmycur % notfound;

    END LOOP;

    CLOSE Xmlmycur;

    END;

    /

    ORA-21560: 3 argument is null, invalid or out of range

    ORA-06512: at "SYS." DBMS_LOB", line 991

    ORA-06512: at "XDB". DBMS_XSLPROCESSOR', line 324

    ORA-06512: at line 15 level

    FYI, it seems that the file being created will exceed 5 gig

    Yes, it is a known issue with DBMS_XSLPROCESSOR.clob2file with big files.

    Here is a slightly modified version of the code that I posted earlier, fixing WRITE_ERROR except:

    DECLARE

    v_file utl_file.file_type;

    -write a unique to clob

    procedure write_clob (p_content in clob) is

    v_buffer varchar2 (32767).

    V_POSITION pls_integer: = 1;

    v_amount pls_integer: = 32767;

    Start

    loop

    Start

    DBMS_LOB. Read (p_content, v_amount, v_position, v_buffer);

    exception

    When no_data_found then exit;

    end;

    UTL_FILE.put_raw (v_file, utl_raw.cast_to_raw (v_buffer), true);

    V_POSITION: = v_position + v_amount;

    end loop;

    end;

    BEGIN

    -Open the file

    v_file: = utl_file.fopen ('TEST_DIR', 'testfile2.txt', 'wb', 32767);

    -loops through the lines

    for r in)

    Select h15_doc

    of h15test.h15_stage

    )

    loop

    write_clob (r.h15_doc);

    end loop;

    UTL_FILE.fclose (v_file);

    END;

    /

  • change the first line of a table to a cell style

    Hello

    I want to change the first line of a table to a cell style.

    Is this possible in javascript?

    Patrick

    Hi patrickbcm,

    Try the threshold.

    app.activeDocument.stories.everyItem().tables.everyItem().rows[0].cells.everyItem().appliedCellStyle = app.activeDocument.cellStyles.item("row1");
    

    THX,

    csm_phil

  • View button 'Add a line' if there are no more than two lines in a table

    Hello

    Is there a possibility of JavaScript to dynamically check number of rows in a table and display the button 'Add Row' in the case where if displayed in number of lines in sub table form is more small/more than some setting?

    Example: I have 2 lines in a picture. The button should be indicated if there are no more than 3 lines.

    User click on the button - a blank line will be added here. Now, the button is hidden until the number of rows will be less than 3.

    Data sheet:

    APEX 4.1.1

    31%

    Listener 1.1.3

    Thank you

    J

    Hello

    I solved it by using the little piece of JS:

    if ($('#report_contact_form tr.highlight-row').length > 1)
    $x_Hide('ADD_ROW_T', true);
    

    Concerning

    J

  • Selected set of line in the table programmatically

    Hello!

    I use JDeveloper 11 g Release 2 (11.1.2.3.0).

    I want to put the line in a table programmatically. My intention is to choose a final that was inserted. (We can do this, questioning the highest Id).

    How can I do?

    Thanks in advance!

    Hello
    Check

    http://mjabr.WordPress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/
    http://itnewscast.com/applications/inserting-new-rows-last-row-table

  • always fill the last line of a table (which may expand)

    Hi, I have problems with a button in the table A that adds a line to another table (table B) and then fills automatically some row of the table (table A) data in the newly created line in the other table (table B)

    Here is my code (then) - I should also mention that table A has a button to add several lines to itself:

    It works almost - however, it does that if the amount of lines in every game table - which they are not necessarily that the user may or may not opt to add the row of the table has to table B. eg. A table might be deep 4 rows, but the table B can have only 2 rows.

    tableB.row.addInstance (0);

    vCol1 var = this.resolveNodes ("tableA.row.cellA");

    vCol2 var = this.resolveNodes ("tableB.row.cellA");

    vCol3 var = this.resolveNodes ("tableA.row.cellB");

    vCol4 var = this.resolveNodes ("tableB.row.cellB");

    for (var I = 0; vCol1.length i < ; I ++) {

    vCol2.item (i) .rawValue = vCol1.item (i) .rawValue;

    vCol4.item (i) .rawValue = vCol3.item (i) .rawValue;

    }

    I'm new to scripting (learning on the fly), so my question is, given that the first command is to add a new row to table B, can I change the code so that vCol4 and vCol2 var are always the very last line created? In this way, all the previous lines that have been added will be shunt down in the list and will not be affected, but click on the new button? Or is there a better way to do this.

    Hello

    I think the key here is that the addInstance method returns the line he simply added.  If your add-in can be something like;

    var button = xfa.host.messageBox ("' you are about to ADD this entry in the Table B. would you continue?", "add to table B Section"1, 2 "");

    If (button is 4)

    {

    newRow = tableB._tableBrow.addInstance var (0);

    newRow.cellA.rawValue = cellA.rawValue;

    newRow.cellB.rawValue = cellB.rawValue;

    }

    I don't know how you want that table a delete button to work?  Should you remove the first row B of the table with a cellA and corresponding cellB?

    Concerning

    Bruce

  • The line of the last line of each table page is going to be missing.

    Hi Experts,
    In OBIEE 11.1.1.6.0, I have a report contains more than one line. "When I click on" PDF "Print", the last line of each table page line will be missing. " Why?
    Are you facing the same case? How soluve this question? Thank you.

    Hey Kobe,

    The question, looks lke a bug. Here's the work around, change the table view, click the properties of content next to the text "Table" (at the top of the columns and measures) in the layout-> position In Border pane to choose custom and select only the bottom edge (horizontal line). Now export to pdf format, you must see the border for the last row on each page.

    Kind regards
    DpKa

  • How to set the text in the last line of the table to be bold

    Hi all

    I have two tables in the report on my page and I would like to have the last line of the table as a "BOLD" text data.

    I found a jQuery selector to select the last row of the table, but I do not know how to implement it in the Apex. I want to control what table will have changed last row and who won't.
    $("tr:last").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
    Could someone help me how to create a dynamic action to accomplish, or if y at - there another solution?

    My test app:

    user name: [email protected]
    passwd: kurintest
    appl: REPORT_APPL 12451

    Thanks in advance,

    Jiri

    Nico Martens wrote:

    PS: If you worry about sql plsql context switching, use a box instead of my function. Which probably could increase performance.

    Using this technique , analytics, and casewould be more effective and offer the best separation of concerns:

    Source report

    select
              product_id
            , sum(quantity_on_hand) qty
            , avg(quantity_on_hand) avg
            , case
                when   count(*) over ()
                     = row_number() over (order by product_id nulls last)
                then
                  'bold'
                else
                  'normal'
              end font_weight
    from
              oehr_inventories
    group by
              rollup(product_id)
    order by
              product_id nulls last
    

    HTML column expression

    #PRODUCT_ID#
    

    Avoid generating HTML in the query when it is possible that its impact on the ability to use the features of declarative report as column sorting and setting in the form. (See examples on page 3)

    If you have a table with 100 rows and you show only 15 lines. Do you want the 15th line "BOLD" or just line 100Le.

    It is really the important issue here. If the reports do not use paging and always show all lines, then it's trivial to implement using dynamic Action (as shown on page 2):
    H4. When

    Event: After refresh
    Selection type: jQuery Selector
    jQuery Selector: .report-standard

    H4. Real Action

    Action: Run the JavaScript Code
    Fire on loading the Page: Yes
    Code:

    $(".report-standard tr:last-child td").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
    

    (Here is to use appropriate DA / jQuery selectors to make sure that only reports including totals get this formatting applied...)

    For more complex presentations, a report of custom line model is the way forward, as in the link in the previous thread of the OP: + {: identifier of the thread = 2436912} +.

    Also note that the columns hidden, based on the GROUP_ID/GROUPING/GROUPING_ID functions are very useful in these reports. They can be used to report conditions of line to avoid the additional conditions to be ready in the query (as in the case above) and provide the break several levels of formatting.

  • Added new line in the table

    Hello

    I have a table inside a panelCollection. When I press the button Add a new row (plu green) the empty line newly added appears in a random place in the table, but I want to appear as the first line of the table (top of the table). How I do that?

    Thank you very much
    Will do

    Will do,

    It is a weird behavior that was introduced in JDev 11.1.1.4. We fixed this in the next version by adding the new line always above the current line.

    You can do two things:
    -Make sure that the size of the range of the iterator binding is greater than the number of rows displayed, in this case the new line will be created directly below the current line
    -extend the JHeadstart TableBean class, override the createNewRow method and create a line in the first line

    Steven Davelaar,
    Jheadstart team.

  • Remove a line from several tables

    Hello

    I have a form that has what appears to be a single table.  Given that I needed 30 column (29 of them are single character fields) I had to use 2 objects from the table.  Then I had the ability to add and delete lines.  Add a line at the end is pretty easy.  Deleting a specific line is the problem.  For now, I added a third table that has a header line and a line of item body.  the body line is a button with the intention to withdraw this entire line of the table.  In other words, need remove the line in all 3 tables.

    My structure is:

    • Form1
      • (Some other subform past who is not serious for us)
      • SubformPersonnel (a subform sank)
        • SubformHeader (a positioned subform)
          • TextOverallHeader (text to label the oeverall 3 tables)
          • ButtonAddRow (adds a line at the end of all 3 tables)
        • SubformPersonnelTable (a positioned subform)
          • ContractorTableRemove (a table with a 1 column for the button Delete)
            • HeaderRow (line hidden to align the table with the other 2)
            • Element (a line with the button Delete)
              • CellRemoveButton (the cell with the button Delete and associated JavaScript)
          • ContractorTableLeft (a table with the left 15 printed columns)
            • HeaderRow
            • Contractor (a row of data to be deleted when it is clicked on CellButton above)
          • ContractorTableRight (a table with the right 15 printed columns)
            • HeaderRow
            • Contractor (a row of data to be deleted when it is clicked on CellButton above)
      • (Some other subforms that I'm not worried at the moment)

    The 3 tables are aligned to the headers of all line up, no space between them.  Body lines line up then and it looks like a large table.  From left to right, they are:

    ContractorTableRemove, ContractorTableLeft, ContractorTableRight

    Point lines and contractor are added when you click on ButtonAddRow in the header of all.  The initial number is set to 8 for each table, so I get 8 rows at the start. The minimum number is set to 1 for each.  I know that each row in each table has the same index number, because I filled in a cell in each table cell initialize durig.  This line, in the click event of the CellRemoveButton removes the row of the cell in this table:

    This.parent.parent._item.removeInstance (this.parent.index);

    I tried all kinds of ways to remove the same line (using the index #) in the other 2 tables: ContractorTableLeft and ContractorTableRight, but do not seem to get the correct correct syntax.  I tried hard coding references, using .parent as shown below and also tried to use an index 1 just to try deleting a line with no result.

    this.parent.parent.parent.ContractorTableLeft._Contractor.removeInstance (this.parent.inde, x);

    Can someone get me the correct syntax here?

    For example put a button Delete hidden on each table, click on that I saw, but I'm afraid it will get in the tables on each side of the table, in that it is the trail.  I reeally want just to refer to the line and remove it if I can avoid all these problems of further removal can cause problems.

    I copied the form to https://Acrobat.com/#d=7M8R50rEHf4AaVXppwyKLw

    Hi Karl,

    Here is your form you: https://acrobat.com/#d=oRRJP3W * OgBk6DqXXbJhgg.

    I've corrected the Add button, the button Delete and remove the button at the top. I annotated the script, so I hope you can follow.

    Hope that helps,

    Niall

Maybe you are looking for

  • Awesome army suspends my Twitter

    Whenever I try to use the Army of Awesome app to answer the questions of people on Twitter, he suspends my account because I'm tweeting too many people. He thinks that I am spamming when I'm not, so it automatically suspends my Twitter account. What

  • How can I restore my mac mini?

    How can I restore my mac mini? This is an OS X YOSEMITE 10.10.5...

  • Newly ordered Dell battery online does not work

    Original title: battery I ordered this battery 1 month ago in line of Dell 65 watt slim auto-air ac adapter for latitude on 4/25 13. What's wrong?

  • HP DV6-3140SE hard drive upgrade

    Hello I want to replace my drive hard set from factory to a new hard drive to 500 GB. Are the new 7mm discs compatible with my laptop? Help, please!

  • Rank of computed column is not work

    Hello PL/SQL gurus and experts.I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64-bit Production versionI have table- drop table t3; create table t3(Pat_NM,Hospital,Test_Range,Total,LyTotal) as select 'Andy','Batra','> 10 Mph','200