Display the value of the column automatically based on another column in a table

Hello

I use APEX 5.0, I have a requirement to display the field automatically based on the tabular presentation of other numbers.

img.png

in the screen shot attached above when I press Add button line a new line is created and enter the value in 'place no.', 'dept and identification of height place' when I press tab or get out of the column "height", "GID" should appear automatically.

To display the GID my query will be like that. "Select GID from x where no = '1011' place and dept = 88 and height = 88'.

How to get the value of from GID of the another value entered in Place no, dept and height in tabular form.

Thanks in advance

Ravi.

Hi Ravi

No need to point of Application or process. I just completed the task with the following steps

(1) create 4 hidden items

P2_SELWID

P2_SELDEPTH

P2_SELHEIGHT

P2_CALCWNAME

(2) gives 3 CSS classes in three columns of tables.

. WID

. DEPTH

. HEIGHT

(3) create the function jQuery for re - get three items from the page on a line if one of them has been changed.

Add the following code to the function and the declaration of global variables

function setRowItemValues(p_rownum){
    wid_col_id = 'f02_' + rownum ;
    wid_col_val = $('#'+wid_col_id).val();
    depth_col_id = 'f03_' + rownum ;
    depth_col_val = $('#'+depth_col_id).val();
    height_col_id = 'f04_' + rownum;
    height_col_val = $('#'+height_col_id).val();
    wname_col_id = 'f05_' + rownum;
    // set P2_SELWID,P2_SELDEPTH,P2_SELHEIGHT
    $s("P2_SELWID", wid_col_val );
    $s("P2_SELDEPTH", depth_col_val );
    $s("P2_SELHEIGHT", height_col_val );
    $s("P2_SELWNAMEID", wname_col_id );
    // Call the Dynamic Action to get WNAME if all values are not null
    if( wid_col_val != ''  && depth_col_val != '' && height_col_val != '' ){
        //Call DA to Get WNAME from WINT
        $.event.trigger("CalcWNAME");
        // set the Tabular form
        $('#'+wname_col_id).val($x("P2_CALCWNAME").value);
    }
}

and run when the Page loads

$(document).on("change", ".WID,.DEPTH,.HEIGHT", function(){
    rownum = $(this).attr('id').substr(4);
    setRowItemValues(rownum);
});

(4) create a dynamic Action to get WNAME based on a PL/SQL function. Note the submitted page elements.

CalcWNAME

(5) set of the corresponding element in the line of the function jQuery, after completing the DA.

Please check and I hope your problem is now solved.

Concerning

Mahmoud

Tags: Database

Similar Questions

  • Deactivation of the column in a table based on the setting in the search box

    Hi all

    I use Oracle Apex 4.1. I have two region

    1. search box

    2. in the form of a table

    In the search box, I have a LOV field where the user can select the value. Based on this LOV in the search box, tabular column f06 must disable or read-only.

    For example if I select THREE in LOV then only column f06 is expected on the other it must disable. How to get there.

    Thanks in advance

    Ravi

    Hi Bobo,

    Hope link below will solve your query.

    Disable the column in a table.

    BR,

    Patrick

  • How to update the table by using the value of a column in a table field

    Hi all
    use APEX4.1,
    I have a tabular presentation based on the HOLIDAY table, it contains the following fields,
    Leave_id
    Employee_name
    No_of_days
    Status
    Here's the column LOV updateable status.
    Lov includes 2 values IE APPROVE and REJECT

    and I have another Table called LEAVE_HISTORY, it contains the following fields.
    Emp_name
    status
    Here whenever the ststus is updated (click the button SUBMIT) in tabular form should also be updated in the LEAVE_HISTORY of the SITUATION of the table column.

    I tried the following in the process of "WE SUBMIT AFTER CALCULATIONS AND VALIDATIONS,"
    begin
    update LEAVE_HISTORY set status= status where upper(employee_name)=upper(emp_name);
    end;
    but it is not kept up-to-date,
    When we updated through forms we can use something like this,
    update LEAVE_HISTORY set status= :P200_status where upper(employee_name)=upper(:P_200_emp_name);  <----here we are referring page item i.e (:P_200_emp_name)
    as the code above, how to run the columns in a table?
    Thank you.

    Hi Gurujothi,

    Try this,

    begin
    update LEAVE_HISTORY
    set status= :STATUS
    where upper(Emp_name)=upper(:EMPLOYEE_NAME);
    end;
    

    Brgds,
    Max

  • How to not display the column heading in the table view?

    I don't want to display the column header in the table display, how I can make?

    If you use JavaFX 8, you can use the following text in an external style sheet:

    .table-view .column-header-background {
      -fx-pref-height : 0 ;
    }
    

    If you use JavaFX 2.2, the - fx-pref-height attribute is not available in css, so I think that you must resort to a search:

    final Region tableHeader = (Region)table.lookup(".column-header-background");
        tableHeader.setPrefHeight(0);
    

    As always, I am obliged to point out that I don't really like the research. Sometimes, they seem to be the only way, however.

  • How to set the value of a column in a table according to another column?

    Hello world!

    I use Apex 4.1.
    My question is how can I set the value of a column in a table according to another column?
    I have a table and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    I tried to use javascript as
     $('input[name=f02]').live('change', function(){
    if($(this).val()!='1'){
    $('input[name=f03]').val("test")}
    }); 
    for the development of the column note to test if the value typed in the content of the column is not 1, but this code assigns the value to all the lines and I need to set only the specified line.

    Can someone give me a hint in any way to do this if possible?

    Kind regards
    drama9346

    You will need create a process on your page type PLSQL and develop this process "we demand" of the page. In this process, you can run the PLSQL you need. That is to say to retrieve the note value as described in your PC:

    and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    In this process, you must provide a return value of the call, and you can do this by using htp.p. Example:

    DECLARE
       --putting x01 in a var to simplify
       l_test_var VARCHAR2(200) := apex_application.g_x01;
       l_return VARCHAR2(200);
    BEGIN
       -- a simplistic test
       IF LENGTH(l_test_var) BETWEEN 10 AND 20 THEN
          l_return := 'String is between 10 and 20';
       END IF;
    
       --this will write l_return to the buffer, and the ajax callback will receive this
       htp.p(l_return);
    END;
    

    And the code that I wrote above, which is javascript, would need to go where your current code is that binds to the onchange event. The result should be that, when a change is made to this element, an ajax request is made on the server. When the call is finished, it will be the value returned in the item you want.

  • How to hide the column in a table in the adf.

    I created the table of the ADF and surround it in the collection of panels, the data in the table from the bean to support variable. Depending on the State, there are a few columns that must hide with the user. I used visible = "false", where the false value will come from backing bean. However the user to the table always have the ability to display the column. Is there any one to hide the column with the user at all times. Fixing the code example:

    < af:column sortable = "false" headerText = "column1" id = "c13" visible = "false" >

    "" < af:outputText value = "{row.columns1} ' id ="ot13"/ >

    < / af:column >

    Hello

    Use the rendered property?

    Concerning

  • Find the name of the column in all tables

    How to find the name of the column in all tables in the database for any column to reveal the name of the person?


    We have over 1000 tables looking for.and in some places, the name column FNAME LNAME, First_NAME, DNAME

    For example we have Customer table, Table EMPLOYEE and the ORDER Table

    --------------------------------

    Customer table
    --------------------------------

    LNMAE

    EMPLOYEE table

    EMP_ID
    DEPT_NAME (we don't want this column as it is not a name column)
    Last_name (he must propose this column because it is named)

    ----------------------------

    CONTROL Panel

    -----------------------------

    ORDER_ID
    ORDER_NAME (we don't want this column as it is not a name column)
    Last_name (he must propose this column because it is named)

    -------------------------

    Dept table

    -------------------------

    Dept_ID
    DEPT_NAME (we don't want this column as it is not a name column)

    Please advise...

    Thank you.

    Hello

    What exactly do you do?

    If you want to display the tables containing these columns, you can query the view data dictionary USER_TAB_COLS (or ALL_TAB_COLS, or, if you have privileges, DBA_TAB_COLS).

    For example:

    SELECT table_name, column_name

    Of user_tab_cols

    WHERE nom_de_colonne IN ('DNAME', 'FNAME', 'FIRST_NAME', 'LAST_NAME', 'LNAME') - or else

    ORDER BY table_name, column_name

    ;

  • loop chart - the chart is based on another query

    I'm working on a report of BI Publisher. The report displays information for a list of stores (store group, by store - each store page break is a page). Now, we want to add a chart (weekly sales - group per week) for each store, we know there is "table within the group" box, we can use, but our problem is that the chart is based on another query, not the original group by query parent store. Could you please help? Detailed information can be provided if required.

    Please check your Inbox.
    I sent you the answer.

    See you soon

    Jorge
    p.s if this answers your question please give the points and close the message

  • How can I know the Position of the column in a table

    Hi all
    How can I know the position of the column in a table...
    For example: -.
    I have a table

    DESC EMPLOYEES

    EmpID
    Ename
    SAL

    I want to know the Empid is in 1st position, ename is 2nd and sal is in 3rd place.

    is this possible?

    SELECT *.
    Of user_tab_cols
    WHERE table_name = 'EMP ';

    Concerning
    Arun

  • maximum value for a column in a table without using rownum and rowid, group

    Hi all

    Is it possible to recover the maximum value in a column of a table without help:
    1 rownum and rowid.
    2. the Group
    3. any built-in function of Oracle.

    Kindly let me know if possible.


    Kind regards.

    Published by: J2EE_Life on January 23, 2012 21:06
    select e1.empno
      from scott.emp e1
      left outer join scott.emp e2 on e1.empno < e2.empno
     where e2.empno is null
    
  • How to replace the value of a column in a table based on the value in the second column?

    Hi, I would like to find in a table 2D for values that meet certain criteria (for example, a column< 0.98).=""  based="" on="" which="" rows="" meet="" this="" criteria,="" i="" want="" to="" replace="" the="" values="" in="" a="" different="" column="" of="" the="" array="" (change="" to="" 'nan'="" so="" that="" the="" values="" will="" not="" be="" included="" in="" any="" calculations="" on="" that="" column,="" for="" example="" the="" finding="" the="" mean).=""  i've="" attached="" a="" sample="" .csv="" file.=""  if="" the="" values="" in="" column="" 3="" (index="" 2)="" are="" less="" than="" 0.980="" (or="" some="" other="" user="" defined="" value),="" then="" the="" value="" in="" column="" 2="" (index="" 1)="" should="" be="" replaced="" with="" nan.=""  can="" someone="" help="" out="" with="" this="" search="" and="" replace="">

    Thank you

    Keith

    (using LV 2009 SP1)

    A few quick hits.

    You can merge the two for loops

    You have not need one of the constants 1 and 2 in the index table.  They will solve automatically when you expand on the index picture, once you have wired to 0 in the column index.

    It seems a lot of handling additional table spent unnecessarily.

    See below.  I did not try to duplicate your code to see how it actually works, but I believe that I have attached will give the same result with less steps.

  • Single request for the display of all, but the values of 1 column for all tables

    Hello

    All tables have the column SYS_CREATION_DATE.
    But I don't want to not display the value of this column

    Can anyone suggest a way in which I could achieve this?

    Oracle version: 11 GR 1 material
    OS: SunOS


    See you soon,.
    Malika

    Published by: user9131570 on July 6, 2010 19:57

    user9131570 wrote:
    @Tubby

    I * table-wise display the values of all but 1 columns (SYS_CREATION_DATE) in my database.*

    I need it to compare to another data base for all these values.

    I would like to make a wild guess at what you are getting.

    In view of these two tables

    create table emp
       (empid number,
        empname varchar2(15),
        empaddr   varchar2(15),
        sys_creation_date date);
    --
    create table dept
       (deptid number,
        deptmgr varchar2(10),
        sys_creation_date date);
    

    you want to combine somehow

    select empid,
             empname,
             empaddr
    from emp;
    

    with

    select deptid,
             deptmgr
    from dept;
    

    in a single sql statement?

  • Display the columns or headers folder

    Hello

    Is pls. possible to show only the line with the results?  I don't want the columns or headers folder.

    TXS for any help.

    Antonio

    • Create a table view
    • Go to the layout editor and click Properties Column and measure. Uncheck 'display title '.
    • Go to the properties of the Table view. Specify a value of 1 in the "lines per Page.

    Select this option if correct/useful.

  • Display the column name of the column more recently updated

    I wonder if it is possible to display the name of the column in the column most recently updated in a table.

    Example:

    Emp table

    Name

    Height

    Weight

    Age

    Update_Date

    Update_Column

    Original record (03/20/14)

    Name size weight Age Update_date Update_Column

    John                                                 03/20/14          Name

    Then someone comes and update the height on 22/03/14:

    Name size weight Age Update_date Update_Column

    John 5'9 03/22/14 height

    And the Update_date and the Update_column would change again if someone came and put a value for the age. And so on.

    Is this possible?

    Also, if the above is possible, would it be possible to display the name of extreme right column if a user updated several columns at the same time?

    Example:

    User updates the sub-folder:

    Name size weight Age Update_date Update_Column

    John 5'9 03/22/14 height

    And adds weight and age at the same time on 24-03-14:

    Name size weight Age Update_date Update_Column

    John 5'9 150 31 03/24 / 14

    The Update_Column would display age because it is the furthest to the right. (Think by reading from left to right, the column that has been updated if the extreme right)

    So to sum things, I need to be able to display Updated_date (which will be the date of the day when the record is the last updated) and Updated_Col (which is the column name of the column was last updated, and if multiple columns are updated then display that value has been updated last in)

    I hope that the examples help to clarify things.

    Thank you

    Steven

    I think I found a solution.

    delimiter //
    create table a (
      id int (10) unsigned auto_increment,
      a int(10),
      b int(10),
      update_date datetime NULL,
      update_column varchar(16) NULL,
      primary key (id)
    )//

    create trigger bu_a before update on a for each row begin
      set NEW.update_date = NOW();
      set NEW.update_column = NULL;
      -- you need to start with the rightmost column if you want
      -- that matched with the highest priority
      if OLD.b != NEW.b then
       set NEW.update_column = "b";
      elseif OLD.a != NEW.a then
       set NEW.update_column = "a";
      end if;
    end //

    TEST

    insert into a (id,a,b) values (1,1,1), (2,1,1), (3,1,1), (4,1,1)[
    update a set b = 2 where id = 2;
    update a set a = 2 where id = 3;
    update a set a = 2 where id = 4;
    update a set b = 2 where id = 4;
    select * from a;

    DISPLAY

    ID  A   B   UPDATE_DATE                    UPDATE_COLUMN
    1   1   1   (null)                          (null)
    2   1   2   March, 24 2014 23:22:33+0000      b
    3   2   1   March, 24 2014 23:22:33+0000      a
    4   2   2   March, 24 2014 23:22:33+0000      b

  • How to display the columns in the wise line in pl sql

    I have to display some values of constant wise online using the select statement. For example, after query both display constant columnwise...

    Select 83: 42 double;

    83 42

    I want to display the rowwise... IE

    Constant
    83
    42

    I can create temporary table and add them then ask, but there should be a way I can use double to show the values line wise. something like

    Select a double where an in (83, 42)

    Appreciate your help.

    Hello

    Here's one way:

    SELECT     column_value    AS cnstnt
    FROM     TABLE (sys.odcinumberlist (83, 42))
    ;
    

    CONSTANT is a keyword from Oracle is not a very good name for your own column.

Maybe you are looking for

  • Loops Parallels and Structure of the event

    Hello Is attached a valid way to the use of the structure of the event?  I keep hearing that the case of the event should include control of the event.  Can the control be placed elsewhere?  For example, if I have 2 loops, I placed a structure of the

  • New HP Envy 17 t

    Want to new happened today. the unit load while I write. Instructions give NO idea how to open this laptop. I see the front hinges and made their attempt to open, push, pull, snap. I got Dells and Toshiba & can not for the life of me find out how to

  • HP G62 overheating &amp; close.

    My laptop HP G62 is overheating and stop suddenly recently.  I tried all of the recommended patches I can find (cleaning of chimneys, bios download, etc.), but to no avail.  She is well ventilated and the air vents are clean.  Any suggestions?

  • Sudden power problem

    (I searched the forums for a couple of hours, without success, before posting) I have a T61p which worked great for a few years.  All of a sudden yesterday, he refused to power upward: a boot cold goes like this: to begin with, only the power plug an

  • Management of e-mail messages

    How can I put a screen that tells me how much space I have left in my Windows mail Inbox?