Comparison of column in the form of table II

Hello

At the APEX 4.1 I am doing something similar to this thread: in table form: compare two fields in column where I need to do a validation on two columns in tabular form. It works for both columns are columns of text box, but I can't make it work when comparing to a single column to display. For validation, I have defined it as an "Expression of PL/SQL" and my expression is: CURRENT_VALUE >: PREV_VALUE where CURRENT_VALUE is a column of text box that accepts user input and PREV_VALUE is only one display column.

Regardless of the absorbed power, the row is updated without any errors raised; He seems to treat the single display value in the vacuum and made the comparison with an empty value. The only solution I could find was to make the comparison in a update trigger on and will raise an error if validation fails; but the result is not as nice as the built in features of validation of the APEX.

No indication on how to make it work using the validation of the APEX is greatly appreciated.

Thank you!

Only column display are for display only and are not saved in the session when you send, so that you can't access with pl/sql.

So either do the validation in javascript/jQuery or, and it is best if you ask me, make a text field and set to read-only.

Tags: Database

Similar Questions

  • Remote column in the form of Bulletin Board on db update

    Hi all

    my need is to update the date and user modified folder. Nothing new.

    I use to work with trigger on a local database as in this example:

    CREATE OR REPLACE TRIGGER "MY_LOCAL_TABLE_T2"
    BEFORE
    insert or update on "MY_LOCAL_TABLE"
    for each row
    begin
    if (:new.CREATED is null)
    then
    :new.CREATED := sysdate;
    end if;
    if (:new.CREATED_BY is null)
    then
    :new.CREATED_BY := nvl(v('APP_USER'),user);
    end if;
    :new.UPDATED := sysdate;
    :new.UPDATED_BY := nvl(v('APP_USER'),user);
    end;
    

    I'm doing the same thing, but I use Apex with a tabular presentation based on a vision of a remote table.

    When I try to compile the trigger this error:

    PLS-00201: identifier 'V' must be declared.

    Another way to do the same thing directly in the Apex solution or suggestion will be appreciated.

    Thank you all.

    Request Express 4.1.1.00.23

    Self-funded, thanks

    trying to create the trigger with your suggestion the error PLS-00201: identifier ' APEX_UTIL. GET_SESSION_STATE' must be declared is triggered.

    I think because of the BD Remote where I have my tables "not see" apex db with func and procs.

    I found this solution which can be reused for different sub tabular form using jQuery:

    -in the form of tables, there are 2 columns I want to update the date of LAST_UPD and LAST_UPD_BY varchar

    -set LAST_UPD like this:

    - Number / Date Format : DD-MM-YYYY HH24:MI:SS

    - Attributes of the element : audit = "date".

    - Default : sysdate

    -set LAST_UPD_BY like this:

    - Attributes of the element : audit = "user".

    - Default : v ('APP_USER')

    -Page - JavaScript

    $( document ).ready(function() {
        $("input[id*='f0']").change(function() {
            idAuditDate = $("input[audit='date']").attr('id').substr(0,4) + $(this).attr('id').substr(4);
            idAuditUser = $("input[audit='user']").attr('id').substr(0,4) + $(this).attr('id').substr(4);
            var d = new Date,
            dformat = [d.getDate(),
                                    d.getMonth(),
                                    d.getFullYear()].join('-')+' '+
                                    [d.getHours(),
                                    d.getMinutes(),
                                    d.getSeconds()].join(':');
            $("input[id="+idAuditDate+"]").attr('value',dformat);
            $("input[id="+idAuditUser+"]").attr('value','&APP_USER.');
        });
    });
    

    Hope this helps.

    Thank you

  • Apex 4.0: In the form of table: how to make reference to the elements?

    Hello
    I have a tabular layout with a certain query. A column in the query (say comm, is not displayed. This column is required in the table

    When a new row is added in the form of tables, I want to add a (complex) value for this column hidden by default.

    I want to add a process (before submitting) to the page.
    How can I make reference to this particular point?


    : P23_COMM: =...

    does not work. It is a column in the query, not a page element.

    Any help appreciated.
    Sincere friendships Erik

    Loop over the hidden PK table, identification of the new line (by finding with PK NULL table th eone) and assign the hidden item corresponding

    Assumung 01 is the primary key column table (use firebug to check this) and 05 is the hidden field

    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
      LOOP
         --Identify new rows
          IF ( APEX_APPLICATION.G_F01(i) IS NULL ) THEN
              APEX_APPLICATION.G_F05(i)  := 
          END IF;
      END LOOP;
    END;
    
  • In the form of table and colspan or how to return more items in one line?

    I want to put a line in a higher number of items table it fits. So I want to put several options on an entry line field and text on another and so on. To restart the line, I made a dummy field with html like this:

    < table > < /tr > < tr > < td >

    But it's really ugly: http://apex.oracle.com/pls/apex/f?p=29764:1
    How to force colspan = X extend this cell of the input line along the table and get rid of these unnececary of the empty cells on the right? Attribute of the element does not (obviously)...

    Create a model of a named column custom report to meet the requirements in the form of tables.

  • If the default value in columns on slot form of table does not work.

    Hello

    I created a tabular form and I want to set some default values to columns that are based on the values of page elements.

    so I put the page element to the value of the column in the attributes in a table by selecting the value & P24_ISSUE_ID. default type as Expression PLSQL & DEFAULT function there but
    in the same way, I tried for the other column by selecting the type default as pl/sql expression and function by default the value & P24_CASE_NAME.

    but it throw an error of this type could not parse the SQL query: ORA-00904: "C254DB": invalid identifier

    I don't understand where I did wrong, I checked for the data types of columns, all right.

    so please help me out of this problem.

    1243 Tulasi wrote:
    for the first column

    I chose
    The DEFAULT TYPE as PL/SQL Expression & FUNCTION

    As the default * & P24_ISSUE_ID.* it is a number data type column

    2nd column

    The default Type as PL/SQL Expression & function

    As the default * & P24_CASE_NAME.* it's column of type Varchar2.

    Element (name of the page element or application) for the default Type and the name of the default item ( P24_ISSUE_ID, P24_CASE_NAME etc.) options appropriate for a default value for a page element.

    * & P24_ISSUE_ID.* is not a "PL/SQL Expression or function.

    but it throws an error, because this guy could not parse the SQL query: ORA-00904: "C254DB": invalid identifier

    What you're doing results in the engine of the APEX, P24_CASE_NAME 'C254DB' value in the default value and then try to assess this string as a piece of PL/SQL. Outside a block in which it is defined as a variable, constant, or a function 'C254DB' is not a valid expression of PL/SQL.

  • Column of link does not work on a manual in the form of table

    Hello

    I'm having some problems by creating a link on a column based on a tabular presentation manual (I use Apex 4.1.1.00.27, Oracle DB 10.2.0.5.0):

    On my 1 page, I created a method that deletes and creates a collection based on the table 'emp '; Then I have a manual tabular presentation based on this collection; and finally, a link in the column "deptno" of the manual tabular form that points to my Page 2 (form of Department) and is passing the P2_DEPTNO parameter: #DEPTNO #.

    The problem is that when I press on the link, the page does not present the value of DEPTNO. In addition, I note that as soon as I specify the column as a column of link, it does not show the value in the form of my table, but if I remove the link, it shows the value correctly.

    I created an example on apex.oracle.com in case some of you want to look at the question:
    Workspace: EDIAZJORGE
    User name: test
    Password: test123
    App name: Sample App
    Number of app: 12231

    I appreciate any ideas or suggestions on how to solve this problem.

    Thank you
    Erick

    Hello
    Change in the report query, check it out.

    In a Word, changed APEX_ITEM. TEXT to APEX_ITEM. DISPLAY_AND_SAVE for the DEPTNO column.

    See you soon,.

  • Comparison of columns in the same Table, with the exception

    Hi all


    I need compare two values of column in the same table. But should ignore a few characters like space, comma, point

    Following should be consistent
    'ABcd f' = 'AbCDf'
    'xyz ..' = 'xy z'
    How is it possible


    See you soon

    Sexy
    with t as
    (
    select 'ABcd f' col1,'AbCDf' col2 from dual union all
    select 'xyz ..','xy z' from dual union all
    select 'xyz ..x','xy z' from dual
    )
    select *
    from t
    where upper(translate(col1,'a ,.','a')) =
               upper(translate(col2,'a ,.','a'));
    
    COL1    COL2
    ------- -----
    ABcd f  AbCDf
    xyz ..  xy z  
    

    Published by: JAC on 4 February 2013 17:22

  • How to create elements of the checkbox on the form of tables

    I use the Application Express 4.2.1.00.08
    We currently have a spreadsheet that is who I am trying to replace application using APEX.

    I have loaded the spreadsheet into a table and have created a tabular presentation using the tabular presentation wizard who created the field in the form of text fields.

    The table has 38 columns in total, so I am trying to retrieve the columns to fit the screen.

    Most of the columns in the spreadsheet contain just the value 1 or null, so I want to make these fields check box so that they are checked if the value of the field is 1 and not controlled if the value is null. If the user selects the checkbox on the ground so I want to write a 1 in the table.

    Can you suggest I do this because several things that I have tried don't seem to work.

    Any suggestions or links to the doc on how to do that would be great.

    The structure of the table is the following:
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    IDENTIFICATION NUMBER
    FIELDNAME VARCHAR2 (30)
    ENTITY_CATEGORY VARCHAR2 (30)
    ATRIBUTE_GROUP VARCHAR2 (30)
    MASTER_SOURCE_SYSTEM VARCHAR2 (30)
    ENTERED_BY VARCHAR2 (30)
    DESCRIPTION VARCHAR2 (30)
    EXAMPLE_DATA VARCHAR2 (30)
    10891 VARCHAR2 (1)
    VARCHAR2 (1) 11072
    10892 VARCHAR2 (1)
    10487 VARCHAR2 (1)
    11065 VARCHAR2 (1)
    VARCHAR2 (1) 11078
    11066 VARCHAR2 (1)
    11067 VARCHAR2 (1)
    VARCHAR2 (1) 11061
    VARCHAR2 (1) 11062
    11063 VARCHAR2 (1)
    11064 VARCHAR2 (1)
    11079 VARCHAR2 (1)
    VARCHAR2 (1) 11057
    VARCHAR2 (1) 10520
    11058 VARCHAR2 (1)
    VARCHAR2 (1) 11056
    1262 VARCHAR2 (1)
    11070 VARCHAR2 (1)
    11059 VARCHAR2 (1)
    11060 VARCHAR2 (1)
    11071 VARCHAR2 (1)
    VARCHAR2 (1) 10819
    11069 VARCHAR2 (1)
    VARCHAR2 (1) 11068
    11074 VARCHAR2 (1)
    11075 VARCHAR2 (1)
    11076 VARCHAR2 (1)
    11077 VARCHAR2 (1)
    11073 VARCHAR2 (1)

    Published by: Kay Richards on June 7, 2013 16:51

    Published by: Kay Richards on June 7, 2013 17:14

    Click on the shape of table on the edit page

    go to the report attributes tab

    you will find the list of form elements

    now, click the icon to change the required column (small pencil icon).

    go to the tab column attributes, change the display as simple field check box.

    Then go to the values tab list.

    you will find the list of values definition text box just add 1 then click on apply changes.

    Run the page, you are gud to go.

    NULL is the default if the checkbox is in a disabled state, just use 1 in the list of values.

    Kind regards

    Mohan.

  • APEX in the form of table 4.2 question

    Hi all

    I tried the new version of 4.2 APEX on apex.oracle.com and I have a problem with the tabular forms.

    When I create a new table (for example on demo_customers) form that everything works fine, but when I changed the customer_first_name in a pop-up key Lov (based on request), and then I saw the error for each line: list of values query execution error.

    The query I used is:

    Select cust_first_name, cust_first_name
    of demo_customers

    Why I got this error Message?

    Hi Stephen,

    the reason for the error that is in your query LOV you use the same column for the display column and the column to return. I don't know if it makes much sense to use the same search for a column of type "Popup LOV key" column, because it will show the same value that you already have query and the opening LOV will do the same...

    Anyway, if you modify your query to use unique alias names it will work fine. I will file a bug that the generator checks the column names for uniqueness.

    select product_name as d, product_name as rfrom    demo_product_info
    

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

    Published by: Patrick Wolf, Sep 5, 2012 13:28

  • Create the form on table in the different schema

    Hi all

    in APEX I am logged in as long as user APEX_USER and the table, I'm trying to access the site with the creation on Table Wizard form belongs to the user. I have granted all privileges on a given user APEX_USER table, the wizard allows me to choose this table in the list, but when I press the next button, I get the following error message:

    You do not have access to the schema that you import. Import failed.

    Contact your administrator for the application.

    Seems to me that something similar had been already discussed here, but still no response.

    V4.1 assistants when you use a different schema

    Please, what are the rights must have my APEX_USER to be able to create forms tables belonging to someone else?

    Thank you very much

    Pavel

    Edit: I did the same thing on my laptop (APEX 4.2.6.00.03) here and it works as expected. This error I get to work with APEX 4.2.3.00.08 (of course you should not necessarily be the cause, very likely, I don't have all of the necessary privileges) :-).

    Hi Mike,.

    Thanks again for your response. If the schema was not related to my workspace, I would yet be able to choose the other schema of the selection list.

    In fact, there seems to be a bug in the link in my message original (for example it is still not fixed in version 4.2.3), but fortunately I was able to find a workaround - I created a view with the same name and the same structure as the original table, and then I was able to generate the form with the wizard , finally I gave up the display and modification of processes page manually. So the solution is I have to force the DBA APEX upgraded to the current version :-).

    Best regards

    Pavel

  • Columns in the dimension fact table

    OBIEE, can we use a column of fact in the related dimension table where this column is only a description column? Well Yes, I know that use columns of fact indeed and volumetric size... But what exactly will question if we do? I have observed in one model... No data connection was there to test...

    Hi Hari,

    Why you cannot create two tables MDB is as a fact and DIM and place all the columns in the description of Sun and measures actually?

    in this way, you should reach patterns star in MDB

    http://www.varanasisaichand.com/2012/04/fact-and-dimension-from-single-source.html  (2nd method)

    Thank you

    Angelique

  • Setting value using javascript on the form of tables created by APEX_ITEM

    I can assign the value using javascript on normal form of table as below:

    var vRow = pThis.id.substr (pThis.id.indexOf ('_') + 1);
    $x_Value ('f05_' + vRow, 'Value');

    However I can't do the same if the tabular presentation is dynamically created by APEX_ITEM.

    Some tips on how to do this?

    Thank you

    If this should not be something like:

    this.id.substring(4, 8)
    

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • Master-detail-shape; Hide/show columns in the form of details according to the column

    Hello

    I have a form master detail. In the long form, I have the columns:
    ID, MASTER_ID_FK, PC_SOURCE, A_C1, A_C2, A_C3, B_C1, B_C2, B_C3

    The PC_SOURCE of the column must be a LOV with values
    NULL VALUE
    A
    B

    So if I choose or enter a master record the detailed form appears and I can enter one or more detail records.

    PC_SOURCE is the first column.
    If I choose one, the columns B_C1, B_C2, B_C3 should disappear as there should be no possible entry.
    If I have B, A_C1, A_C3, A_C2 columsn should disappear as there should be no possible entry.

    Is this possible?

    I tried a bit of my own, but without success. I tried to put in the first column (lov SOURCE PC) in the attributes of the element a javascript call like onChange = "do_Refresh('#PC_SOURCE#'); »

    The javascript funktion do_Refresh tries to grab the value of the column and the value of a hidden item P1_SOURCE as document.getElementById('P1_SOURCE').value = v_source;

    But this does not work, because there is not the value of the recovered column.
    And probably can´t work because of more lines of a detail.

    Thank you and best regards,
    Matthias

    Hello

    The html code of your detailed form will be an array of the elements of entry with names f01, f02, etc.. The columns of the key of the fields are normally hidden, so your PC_SOURCE column will probably use the name f03. A_C1 column name will be f04 etc.

    Once you have the input names for your columns, you can create a dynamic action (DA) to hide the items you want.

    You want the DA to fire when any element PC_SOURCE is changed if you want when to be:
    Event: change
    Selection type: jQuery Selector
    jQuery Selector: input [name = "f03"]
    Condition: no strings attached

    The action is to hide an element in the same line, if the changed item is a value. The action must therefore:
    Action: Run the JavaScript Code
    Fires when the event is: true
    Code: if(this.triggeringElement.value=="A") {$x_Hide ('f04_' + this.triggeringElement.id.split ('_') [1])}

    You then need a lot of real actions for each item that you want to hide.

    Rod West

  • Only read the column in the form of planning

    Hi gurus,

    I want to do a red column in planning webform. How can I achieve this? If I give read access to this column for a user and assume that it is a computed column, the calculation is done for the user? To calculate a cell in the form, is that he needed centimeters to write to the user?

    Kind regards

    Hello

    Say you want to have Jan, Feb in your columns, but you want to make read-only Feb, that's what it takes

    In the columns/line under the column dimension tab

    Select period in the drop-down list, enter Jan as a member.

    Now click on add a column

    Enter Feb for the Member, click read-only.

    Ok?

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • view complete information used in the form of tables...

    Hi all...
    Asked by management to design a form in which they can view the following information for all employees in a tabular presentation... STAFFNO, NAME, TYPE, NATIONALITY, POSITION, SITUATION, ASSESSMENT, NUMBER of PROBATE,... this info was previously available in MS-ACCESS now that they want in oracle, I did... after the form using the wizard of datablock project how hsould as when I run my forms, information for abv of 800 employees are dispalyed...

    , you have executed a query in your block with CTRL + F11 (may F8 with PC key mapping)?

Maybe you are looking for