Hide columns on tabular forms to Apex 4

Hello

I'm trying to hide the columns editable on a form in a table column by using the conditional display feature. I want to use a sql query and see if it exists and determine which columns should be editable. However, how to reference the primary key id hidden?

For example:
select * from myTable where id = <row id>
My question is how to reference the row id? I use apex_item.hidden(1,"row_id") and then use apex_application.g_f01?

I use 4 Apex.

Thank you

Mark

The status of the column is column of the report as a whole and not for each line.

If you want to hide data columns based on the data row, you can use javascript to loop over each line and hide the contents of the table cell.

If you use the APEX_ITEM API to display the form in a table (not using Wizard), it's pretty easy

For example

  SELECT case 
               when  then APEX_ITEM.TEXT_AREA(p_idx => 1,p_value => ,p_attributes => 'readonly=readonly' )
               else  APEX_ITEM.TEXT_AREA(p_idx => 1,p_value =>  )
       end COLUMN1
         ,...
  

Tags: Database

Similar Questions

  • How to validate the columns in tabular form date?

    Hello


    I have two columns in tabular form date

    1.start_date 2.End_date so here I need validate the end_date shouldn't be less than column start_date

    so any solution for this?

    Hello

    use a validation of type "Function returning a Boolean" and the following code:

    IF to_date(:YOUR_END_DATE,'YYYY-MM-DD') < to_date(:YOUR_START_DATE,'YYYY-MM-DD') THEN RETURN FALSE;
    ELSE RETURN TRUE;
    END IF;
    

    The date format is of course your choice.

    I hope this helps...

    Thank you
    Sandro

  • How can I set a value of page element to a column of tabular form field when add line button clicked?

    Hello

    I'm new in APEX. I work with APEX 4.2.

    I have a simple form in a page (page no. 3) and I have another region containing a tabular form on the same page.

    P3_EMP_ID is a part of the area of simple form.

    And there is a column field named 'emp_id' tabular.

    If it is possible that

    When I click on the button "add row", field in the column named 'emp_id' in a table will be filled with the value that is available in P3_EMP_ID?

    Pls someone help me.

    Thnks

    Magali

    Yes, it is possible

    simply to > edit in > attribute report > change empno field tabular > attribute in the form >select and set up according to

    default type: point (the name of the application or page element)

    default: P3_EMP_ID

    I hope this helps...

  • ReadOnly columns on tabular forms (Javascript?)

    I have a question in regaurds to tabular forms. I have a tabular form in place, works perfectly. However, I want to be able to do some readonly columns to add the new line (new button line).

    Scenario:

    (1) go to the sub table form
    2) click Add row
    (3) once the new line apppears, columns must all be read only columns (i.e. cant type in there)
    (4) exception: there is a column, a selection list, which should not be readonly.
    (5) according to the whose value is selected in the select list, determines the columns that will be editable or non-read-only.

    -The last step is simply a conditional. The part that has plagued me accesses actual columns in the form of tables. I'm not sure how to in this regard. I still make changes to the actual::AddRow() function itsself?

    Thanks for any help in advance

    Best regards, #StillLearningApexGuy

    Check this example

    http://Apex.Oracle.com/pls/Apex/f?p=46417:11

    Sign in as test/test

  • Added new line at the top of tabular form in APEX 5.0 and universal theme (topic 42)

    Hello Apex Experts,

    When the user clicks on the button 'Add Row' a tabular presentation, I would like the new line to be at the top of the report rather than the bottom.


    I followed the instructions from Added new line at the top of table in APEX 4.0 form and Denes Kubicek demo application. But it does nothing, always create new bottom line.


    Anyone have an idea or an idea?


    Your help would be appreciated.


    Kind regards

    Blabla

    Hi all

    This problem is now solved by following the new blogpost of Dene:

    http://www.deneskubicek.blogspot.de/2015/05/tabular-form-add-rows-top-universal.html

    Kind regards

    Blabla

  • Activation of some columns in tabular form after selecting a checkbox

    Hello
    I'll have a tabular presentation in oracle apex which has 6 columns and the third column is a box, my requirement is when I select the check box, the other three columns must be enabled otherwise the three columns should be disabled.

    Allows a solution for this

    With respect,
    Barro

    Hello Barouk,

    I will propose a solution of jQuery based.
    What kind of tabular Presentation you built?


    • In that wizard based

    • APEX_ITEM based API

    I'll take account Assistant based in table form. Now take the feature into account.
    >
    My requirement is when I select the check box, the other three columns must be enabled otherwise the three columns should be disabled.
    >
    Do you want to make the line items (including box you checked) of the three columns enabled?
    If so, we will start the Page attributes:

    Go to Page-> section of Javascript attributes:
    Function and Global Variable declaration:

    function zeroPad(num) {
       var numZeropad = num + '';
       while(numZeropad.length < 4) {
            numZeropad = "0" + numZeropad;
       }
       return numZeropad;
    }
    

    The importance of the above function, is that the elements in a table have id of type f04_0001. In the next row in the same column, the element has attribute id f04_0002 and so on. So let's use the function above to build * 0001 * part of the id.

    Run when the Page loads:

    disabled_list = $('input[name="f04"],input[name="f05"],input[name="f06"]');
    disabled_list.each( function() {
          $(this).attr('disabled',true);
          });
    

    Suppose that the three columns that you want to activate are of type text. Thus, the loading of the page we will deactivate them which makes the code snippet above.
    Now how you will locate that which element of the column has the name attribute. Here's more legendary firebug to add/tool [url http://getfirebug.com/] photo if you use Mozilla Firefox as browser development.

    Header HTML:

    
    

    Above is the function to activate the line items including checkbox that you clicked. Now, bow here is the line number which box you clicked and pThis is the identifier of the item in which you clicked know DOM checkbox.
    OR
    If your condition is what allows three remaining columns , the JS function above will be:

    
    

    Now just goto statement attributes-> attributes of the checkbox column. In the attributes of the element , we will call the JS function to activate the line items in the three columns:

    onclick="f_enable_row(parseInt(#ROWNUM#),this);"
    

    Please read the FAQ [url https://wikis.oracle.com/display/Forums/Forums+FAQ] and [url https://forums.oracle.com/forums/ann.jspa?annID=1324] instructions to forum for more information on the use of the OTN forums effectively.

    The above statement is aimed at directors new members on the forum and you see to the meagre information provided:
    >
    I'll have a tabular presentation in oracle apex which has 6 columns and the third column is a box, my requirement is when I select the check box, the other three columns must be enabled otherwise the three columns should be disabled.
    >
    It is quite difficult to understand what your issue is and how to respond. So, please go through the Instructions on the Forum and FAQ.

    Please affix the useful or correct answer as it will help other members on the forum with a similar question.

    I hope that helps!
    Kind regards
    Kiran

  • Capitalization in tabular form

    I work in APEX 4.0.

    I want to be able to define a column of tabular forms in capital letters. I can do this with javascript for the elements of the page, but I can't do the same for tabular columns forms. Please, if you know a way to do this, I would appreciate your help.

    Doug wrote:
    I work in APEX 4.0.

    I want to be able to define a column of tabular forms in capital letters. I can do this with javascript for the elements of the page, but I can't do the same for tabular columns forms. Please, if you know a way to do this, I would appreciate your help.

    This can be done easily by a dynamic action and a built-in JavaScript API.

    Create a dynamic action as follows:

    Event: Unlock key
    Selection type: JQuery selector
    Replace your internal column name attribute or name of f03 = "fxx", you can get this by inspecting one of your field column in chrome/firefox
    Jquery selector: input [name = "f03"]

    Add real Action as follows
    Action: Run the JavaScript Code
    It is generic and not need to change
    Code: $v_Upper (this.triggeringElement);

    Change the dynamic action now and define the scope of the event on +(this change is required so that this dynamic action will work for newly added rows) + live

    It is now, as soon as you type something in this column and release the button, the text will be converted to upper case

    Thank you
    Vikram

    Published by: VC on April 20, 2013 18:35

  • 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.

  • How to customize the width of fields in tabular form?

    Hi all

    I have the small demo application created on demand 4.1.0.00.23 Express. None of the pages has been created as a table. I want to customize with columns to this page. When I click on edit this page and go to the regions - report, I see a field titled "width of the column. Unfortunately, it seems that everything I put in here is ignored. The width of the column remains constant, regardless of if I put 2 or 200 as column width. How can I customize with columns in tabular form?

    Thank you for your time.

    Daniel

    danield_2 wrote:
    Blue,

    Thanks for your suggestion. This page has tabluar shape, and I do not see here of "the column definition. The content area is "Report" and when I click it, I see: "Alias"; 'Link '; 'Change '. 'Title', 'Coumn Width","The column alignment", etc.
    I tried to 20px in the "column width" and I got an "Invalid number" error when I ran this page. But if I put 2 or 200 - column is always in the same width.

    Daniel

    Hi Daniel,.

    On the page you describe with the Alias, the link, position etc. beside the column in question, there should be a link change (type of pencil icon), to get the column attributes for that particular item, you need to click on this icon. On the resulting page there is (on APEX 3.1 there is) a column formatting section of the column, you will see the scope of the CSS style there.

  • make a column in tab form readonly but writable when you press Add the line

    Hi all

    I have several pages with tabular forms based on a single table with an ID as the key primary and filled with a sequence by a trigger. So far so good. Now, I also have the 'significant primary key', presents a second column that has a unique key constraint. Now, I want to make this column readonly tabular form for all records already there and I want to do is return to writing when I push add line. So in fact, a user can insert this 'unique key', but then he can't change it more.

    I already tried to use java script as
    < script type = "text/javascript" >
    $(document) .ready (function () {}

    var arr1 = $("td[@headers=ART_ID]");
    for (i = 0; i < arr1.length; i ++)
    {
    If ($(arr1_).html() == null | $(arr1[i]).html () .length == 0)
    {
    {$(arr1[i]).each (function ()}
    $(arr1[i]).readOnly = true ;}) ;
    }
    on the other
    {
    {$(arr1[i]).each (function ()}
    $(arr1[i]).readOnly = false ;}) ;
    }
    }
    });
    < /script >

    But this only works with the "disabled" attribute, but then I had the problem that I can't introduce any line.

    Anyone with a solution for this?

    Thank you

    Erwin

    O.K.

    so you use javascript to loop on columns and set the attributes of cells to all that. You're right, disabled will cause the error message "no data found" to appear (I've had this a few days ago and first I wondered why :)).

    Of course, readonly works. You just need to write a little different:

    $x('f01_0001').readOnly = "readonly";

    and it will do the job.

    See this example:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:213

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

  • Disable the image of calendar in tabular form in version APEX4.0

    Hi all

    I used the JQuery code following in dynamic Action to disable the Hiredate column in tabular form in APEX4.0.

    $('INPUT[name="f01"]').each (function (i)
    {
    var rowSelected = $(this).attr("id").substr (4);
    var hire_date_id = $('#f05_'+rowSelected).attr ("id"); F05-> column of hiring Date which is the date picker
    $x (hire_date_id) .readOnly = "readonly";
    $x (hire_date_id).style.background = "#F2F2F5";
    $($("td [headers ="HIREDATE"] img')) .addClass ('apex_disabled');
    }
    );

    HireDate column is disabled the calendar Image is not disabled in APEX4.0 but it did not work in version APEX4.2.

    Can someone tell me the reason and the solution for this problem?

    Thanks in advance.

    Kind regards
    Lacombe

    Published by: 1004558 on May 7, 2013 07:39

    Thank you very much, Dene,.

    Your code has been useful for me. But I created the picker using JQuery in DA as below,

    $('input[name="f05"]').datepicker({
    dateFormat: 'dd-M-yy',
    changeMonth:true,
    changeYear:true,
    showButtonPanel:false,
    buttonImageOnly:true,
    showOn:'both',
    buttonImage:"#IMAGE_PREFIX#asfdcldr.gif"
    }).parent("td").addClass("datepicker");
    

    and use the following query to disable,

    $('input[name="f01"]').each( function(i) {
    var rowSelected = $(this).attr("id").substr(4);
    $('#f05_'+ rowSelected).datepicker( "disable" );
    }
    });
    

    After that I enabled it in another DA before submitting the page.

    It works Fine... :))

    Thank you
    Lacombe

  • If the default tabular form when you add line

    Hi guys,.


    I had a tabular presentation where I need to set a default 1 value in one of the fields that I click on Add a line. I have no idea how to reference the element in a table via JavaScript.

    Despite this, Add a line already button calls a javascript function to add a line, do not think its possible to use javascript here.

    Any suggestions how can I achieve this?

    Thank you very much.

    Can't you just change column attributes > tabular form attributes > type default PL/SQL Expression or a function > as the default * '1' *.

    This should add the value 1 to add when you click line

    You can use JavaScript, but why worry if it's easily achievable

  • APEX: Can we add additional items in tabular form existing

    Hi Experts,

    I built a nice tabular form with all the buttons and whistles.  All goes well until my request for the user to add another

    the point in the form of tables and here's my night Mare, I have this error code

    failed to parse SQL query: ORA-01403: no data found 

    I pinned it down to the process of the ApplyMRU or ApplyMRD; because once I delete these.

    I see the tabular presentation.

    But when I tried to manually recreate the SRM process, with the same criteria, I have the same error code

    Is this a Bug or just the way the behaviour of tabular presentation?

    What should I do to fix the error?

    Please don't tell me that I have to rebuild the tabular presentation.  :-(

    Hi JAS-Oracle,

    JAS-Oracle wrote:

    Hi Experts,

    I built a nice tabular form with all the buttons and whistles.  All goes well until my request for the user to add another

    the point in the form of tables and here's my night Mare, I have this error code

    failed to parse SQL query: ORA-01403: no data found
    

    I pinned it down to the process of the ApplyMRU or ApplyMRD; because once I delete these.

    I see the tabular presentation.

    But when I tried to manually recreate the SRM process, with the same criteria, I have the same error code

    Is this a Bug or just the way the behaviour of tabular presentation?

    What should I do to fix the error?

    Please don't tell me that I have to rebuild the tabular presentation.  :-(

    Here an other elements means another column in the form of tables... Right?

    This column to another is the same table on which you build your tabular presentation.

    If this is the case, then you must add the extra column in your select query and a few changes in the properties of this column, no need to do anything with the process of the MRU.

    for that go to report attributes-> change the newly added column-> slot of the attributes of tabular form

    The Table - name of the schema reference owner

    The Table name - name of the reference table

    Column name of the column in reference

    If this isn't the case then of additional information on the same.

    If the column is in the other table, to check out this blog: manipulate several tables in a tabular form

    or create the sample on the apex.oracle.com, allowing the user to resolve your issue quickly.

    ,

    Hope this helps you

    Kind regards

    Jitendra

  • How to refer to the primary key column of newly inserted rows of tabular form

    Hello

    I use APEX 4.2.0.00.27 with Oracle DB 11.2.0.3.0.

    I work with a tabular presentation wizard-created for insert and update a table using the integrated SRM process (sequence 10).  I'm trying to use a process of anonymous block of PL/SQL (sequence 30) to make another manipulation of table after the records were inserted or updated.  The manual process is associated with my tabular form and I use the variables of name of column binding in my program block.

    My (rsn_test) table has 3 columns: test_id (number), test_nbr (number), test_id2 (number).  Test_id column is identified as the primary key and the type of the source already exists a sequence rsn_test_seq.  Column test_id2 gets its default value 0 to a hidden page element.

    I would use my manual process for updating the value of the test_id2 column.  If it's 0 then I want to put the value of the column test_id.  If it is any other value, then it must remain at this value.  My logic works very well for an existing line, but I'm running into a problem with the newly added lines.  The new lines get inserted, but the test_id2 column remains the default value 0.  I can tell the debugger that the SRM process is triggered first and inserts the line, then my manual dealing with fires.  The problem seems to be that the connection variable: TEST_ID for the primary key column remains NULL after insertion.  I don't know how to get the value of the column test_id of my newly created line to use in my PL/SQL block to my update.

    Process of PL/SQL:

    DECLARE
    BEGIN
       :P7_SHOW := NULL;
       :P7_SHOW := NVL(:TEST_ID2,555) || ' and ' || NVL(:TEST_ID,787) || ' and ' || NVL(:TEST_NBR,9999);
       IF :TEST_ID2 = 0 AND :TEST_ID IS NOT NULL THEN
          UPDATE rsn_test
             SET test_id2 = :TEST_ID
           WHERE test_id = :TEST_ID;
       ELSE
          :TEST_ID2 := :TEST_ID2;
       END IF;
    END;
    
    

    Excerpt from the debugger:

    0.01625 0.00010 Processes - point: ON_SUBMIT_BEFORE_COMPUTATION
    0.01635 0.00008 Branch point: Before Computation
    0.01643 0.00003 Process point: AFTER_SUBMIT
    0.01646 0.00022 Tabs: Perform Branching for Tab Requests
    0.01668 0.00008 Branch point: Before Validation
    0.01676 0.00024 Validations:
    0.01700 0.00135 Perform basic and predefined validations:
    0.01835 0.00020 Perform custom validations:
    0.01855 0.00049 ...Validation "TEST_NBR must be numeric" - Type: ITEM_IS_NUMERIC
    0.01904 0.00007 ......Skip for row 1 because row hasn't changed
    0.01911 0.00016 ......Skip for row 2 because row hasn't changed
    0.01927 0.00012 ...Validation "TEST_ID2 must be numeric" - Type: ITEM_IS_NUMERIC
    0.01939 0.00007 ......Skip for row 1 because row hasn't changed
    0.01945 0.00018 ......Skip for row 2 because row hasn't changed
    0.01964 0.00005 Branch point: Before Processing
    0.01968 0.00004 Processes - point: AFTER_SUBMIT
    0.01972 0.00588 ...Process "ApplyMRU" - Type: MULTI_ROW_UPDATE
    0.02560 0.00154 ...Execute Statement: declare function x return varchar2 is begin begin for c1 in ( select "RSN_TEST_SEQ".nextval pk from sys.dual ) loop return c1.pk; end loop; end; return null; end; begin wwv_flow.g_value := x; end;
    0.02714 0.00140 ......Row 3: insert into "APPPCSRSN"."RSN_TEST" ( "TEST_ID", "TEST_NBR", "TEST_ID2") values ( :b1, :b2, :b3)
    0.02854 0.00011 ...Process "ApplyMRD" - Type: MULTI_ROW_DELETE
    0.02865 0.00004 ......Skip because condition or authorization evaluates to FALSE
    0.02869 0.00015 ...Process "Process Submit" - Type: PLSQL
    0.02884 0.00007 ......Skip for row 1 because row hasn't changed
    0.02891 0.00012 ......Skip for row 2 because row hasn't changed
    0.02903 0.00012 ......Process row 3
    0.02915 0.00429 ...Execute Statement: begin DECLARE BEGIN :P7_SHOW := NULL; :P7_SHOW := NVL(:TEST_ID2,555) || ' and ' || NVL(:TEST_ID,787) || ' and ' || NVL(:TEST_NBR,9999); IF :TEST_ID2 = 0 AND :TEST_ID IS NOT NULL THEN UPDATE rsn_test SET test_id2 = :TEST_NBR WHERE test_id = :TEST_ID; ELSE :TEST_ID2 := :TEST_ID2; END IF; END; end;
    0.03344 0.00013 ...Session State: Saved Item "P7_SHOW" New Value="0 and 787 and 1300"
    0.03356 0.00004 Branch point: After Processing
    0.03360 0.00048 ...Evaluating Branch: "AFTER_PROCESSING" Type: REDIRECT_URL Button: (No Button Pressed) Condition: (Unconditional)
    0.03407 0.00013 Redirecting to f?p=290:7:8717971109610:::::&success_msg=0%20row(s)%20updated%2C%201%20row(s)%20inserted.Success%2FEBD244168556408CBA714E3974918C09%2F
    0.03420 0.00012 Stop APEX Engine detected
    0.03432 0.00007 Stop APEX Engine detected
    0.03439 - Final commit
    
    

    Any suggestions?

    I have run tests on

    https://apex.Oracle.com/pls/apex/f?p=83488:1 demo/demo

    to see your problem.

    I have 2 solution for your problem.
    I add trial NOT tabular just usual block of PL/SQL

    BEGIN
    I'm IN (SELECT TEST_ID FROM RSN_TEST WHERE TEST_ID2 = 0)
    LOOP
          UPDATE RSN_TEST
             SET test_id2 = TEST_ID
           WHERE test_id = i.TEST_ID;
      END LOOP;
    END;

    and works very well, you can see in the sample.

    The other solution is to show new generated TEST_ID

    Adding a sequence as a default value for a column in a table field

    And to execute your procedure.

    I get how is with the good luck of time.

    By

  • How to remove tabular form column position of underscore

    Hi guys,.

    I use APEX 4.1, I want to delete tabular form underscore column heading, you could you please guide me how to do this?

    See you soon,.

    San

    San wrote:

    Hey sorry, I couldn't find the #TEMPLATE_CSS # in my page template.

    I use two Tabs - model level of right sidebar (optional / based on a table)

    I was using 4.2. 4.1 Add

    After

    in the page header.

Maybe you are looking for