Clear the check box according to the value of column DB

Hello
My requirement is to disable the check box according to the value of a column DB. Say for example my report displays the following. Check box, the name of the EMP, Dept. If the Department is the checkbox should be disabled and user should not be able to select the check box.
Ask your help for a solution.
Thank you
Prasanth

You must use the parameter p_attributes of the apex_item.checkbox API to make the boxes off (readonly do not work with the checkboxes)

SELECT ..
CASE WHEN  THEN APEX_ITEM.CHECKBOX(1,)
                     ELSE APEX_ITEM.CHECKBOX(1,,'disabled="disabled"')
          END 
  ..

Tags: Database

Similar Questions

  • How to clear the values of the APEX

    Hi team,

    In our application, I had implemented these changes listed below.

    1. we have two tabs, one for delete records & other one to restore the records that have been deleted.

    2. tab delete, I'll be if you select date & click the button remove.

    3. click on Remove button a pop-up window will be opened where we needed fields and click on submit button.

    4. for the first time, when popup window open required fields will be empty and once provided and click on submit these values will be removed from the rear end and store in the table.

    5 now, I went to tab to restore, where I had provide date and click Restore, so the records which had been deleted got restored back.

    6. After restoring back, I returned to Delete tab and once again chosen the date and click on the button Delete, click clear said previous window will be open, but this time in the pop-up screen, we can see values already exist which have been entered previously.

    -If the problem is how we can clear the values in the popup screen when comes to remove the tab and process. Any help much appreciated.

    Kind regards

    Sruthitamiri

    Sruthi Tamiri wrote:

    Thank you for the quick turn around, little confuse how to delete in URL, here's what we used. Could you please help me were to make changes.

    The element is P3_Requested, P3_Who, P3_Why

    1. URL = ' f? p = & APP_ID.: 3: & APP_SESSION. : 3::P3_TRADE_DATE, P3_DAILY, P3_MONTHLY: "+ $x("P1_START_DATE").value + ',' + $x("P1_DAILY_0").value + ',' + $x("P1_MONTHLY_0").value;
    2. w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");

    You have '3' in the position of debug in the URL, not the ClearCache position:

    f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

    It's basic stuff that should be easily resolved by referring to the documentation...

  • even if the margins and clear the values defined divs, overlaping

    For this site, the text in the DIV called "thumbnailshere" overlaps the div below, even if the margins and clear the values have been set.

    http://tfproperty.co.UK/checkthisout/about.html

    How can I fix it?
    Thank you

    jdldn wrote:
    > For this site, the text in the DIV called "thumbnailshere" overlaps the div
    > below him, even if the margins and clear the values have been set.
    >
    > http://tfproperty.co.uk/checkthisout/about.html
    >
    > How to fix this?
    > Thank you
    >

    This is because you have set the height on your 'thumbnailshere '.

    . Never
    the value height unless you know how high the content is going to be.
    Remove the height.

    {.thumbnailshere}
    height: 400px; / * remove the height * /.
    margin-top:-10px;
    }

  • change the color of line based on the value of column 5 Apex in the classic report

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Hello

    I know this question has been asked several times here, but I'm working on 5 Apex and need to know the correct way to do it in this version.

    I need to change the color of the text of the entire line (no background color) based on the value in one of the columns of the classic report. I have just two conditions, if the value of column = Yes, color should be red, otherwise it must be green.

    I am new to jscript and css, so appreciate if someone can tell me the solution with steps.

    I have already checked this link that changes the value of the column, need to do something similar to the whole line.

    https://tylermuth.WordPress.com/2007/12/01/conditional-column-formatting-in-apex/

    Hi coolmaddy007-Oracle,.

    Here's an example set up on the apex.oracle.com according to the specifications you gave: https://apex.oracle.com/pls/apex/f?p=35467:1

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Here is how it is done:

    Create a dynamic action with the following specifications:

    Name: Give the appropriate name

    Event: After refresh

    Selection type: region

    Region: select your region classic report

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $('td[headers="JOB"]').each(function() {
      if ( $(this).text() === 'MANAGER' ) {
        $(this).closest('tr').find('td').css({"color":"red"});
      }
      if ( $(this).text() === 'SALESMAN' ) {
        $(this).closest('tr').find('td').css({"color":"green"});
      }
      if ( $(this).text() === 'CLERK' ) {
        $(this).closest('tr').find('td').css({"color":"blue"});
      }
    });
    

    NOTE: Download the selector appropriate for your knowledge $('td[headers="JOB"]') case using firebug/browser development tools.

    Items concerned: leave blank.

    PS: Changed the example to change the color of text instead of the background color.

    I hope this helps!

    Kind regards

    Kiran

  • Request to remove row where the value of column contains alphabets

    Hello

    Could someone please help me to get this application working.

    Request to remove row where the value of column contains alphabets.

    DELETE FROM BIN_ITEM WHERE order_nmb LIKE '% [A - Z] % ' | LIKE '% [a - z] %'

    Thank you and best regards,

    Madam.

    SELECT order_nmb FROM BIN_ITEM WHERE regexp_count(order_nmb,'[0-9]') = 0

    ----

    Ramin Hashimzade

  • How to clear the value of af: inputFile

    Hello

    12.1.3 Jdev

    I have a page that has fields based on a QueryBased VO and an af:inputFile field. This input file has a valueChangeListener which will set the selected file and the name of the attribute to display.

    Once I click on send in the page, I'll take the values in the row of VO and using the values that I have created folders in 3 tables using 3 EO according to your.

    After that I reset the VO based query as below, so that the screen is refreshed to go into the details of the next:

    1 is a recommended approach (everything works fine)? If this is not the case, what is the recommended approach. ?

    this.getDBTransaction().commit();
    
            IbisAccountantRegVOImpl accountantRegVO = this.getIbisAccountantRegVO1();
            accountantRegVO.clearCache();
            accountantRegVO.setWhereClause("1=2");
            accountantRegVO.executeQuery();
            IbisAccountantRegVORowImpl accountantRegVORow = (IbisAccountantRegVORowImpl) accountantRegVO.createRow();
            accountantRegVORow.setNewRowState(Row.STATUS_INITIALIZED);
            accountantRegVO.insertRow(accountantRegVORow);
    

    Note: Another option that I think is just set to null for all VO plate instead of create a new line.

    2. the component of af: inputFile still has the selected file. How to delete this value?

    See you soon

    AJ

    If you don't want any line in your VO, so instead of

    accountantRegVO.clearCache ();

    accountantRegVO.setWhereClause ("1 = 2");

    accountantRegVO.executeQuery ();

    You should probably use: accountantRegVO.executeEmptyRowSet)

    But I don't know if you still need to do this (you have probably just to set up a new line in the current, with accountantRegVO.setCurrentRow (accountantRegVORow) or something like that)

    And for inputFile reset, see: https://blogs.oracle.com/jdevotnharvest/entry/how_to_reset_adf_faces

    Dario

  • How to clear the value quickly adopted by the last navigation between pages.

    Hello

    I have 3 pages (A, B, C) under the same dashboard, and they come from the same domain.

    A and B are summary pages, say they have columns in their analysis and prompt as below has a column named A - Col; B a column named B - Col.

    C is the detail of the page. He has two columns, that is A - Col, Col - B in its analysis and invites.

    That is the problem.

    When I browse from A to C, the C got the value of the parameter A and keeps. For example, the A - pass in guest page C was set at 'A' now

    And I switch to the B page by clicking the page tab and go to the C page by clicking on the column B - Col. The C will get the value of B and keep it. For example the B - pass online of the C page now has the value 'B '.

    But the problem is the value of A - collar is not clearly. It is still 'A' who went from page one last time. It caused the C analysis incorrect result page.

    I was expecting to see the info in detail on page C B - Col = 'B' when you navigate from page B. But I got the result that A - Col = 'A' and B - Col = 'B '.

    Any way to solve?

    Thank you very much in advance.

    Kind regards

    Alex

    Alex,

    Please, add the tag in instancexonfig.xml under tags and restart the presentation server.

    fake

    This will force the server to use the scope of the dashboard page.

    Thank you

    Vineeth

  • Check boxes that keep their value after a refresh

    Hello

    I'm working with checkboxes in an HTML region that will make another region appear or disappear when they are registered or not. If I understand correctly, I need to send the page so that the regions appear or disappear - but when I do the remember checkbox default value.

    My box is based on static love: STATIC2:; Y that should be checked when the value is 'Y' and unchecked when it is 'n'. I put its value by default for Y.

    I read online about how to make a checkbox to remember its value by putting a calculation on it that will define the value of the checkbox for "n" when it is null. Unfortunately, when I refresh the page, if the box is checked, then fine (as before) - but if it is unchecked, then I suddenly get two boxes - which are checked and a "n".

    Someone has an idea what I am doing wrong? It's driving me crazy trying to achieve something that I expect a little work without any effort.

    I use Apex 4.1.1.00.23

    Thank you

    Dan

    Dan CondonJones wrote:

    Is there a a way to make the default check mark without her checking those unchecked when I submit the page? Or would I need to create some process that sets the items manually when I navigate to the page?

    This is a common situation. The usual approach is to use another page to report whether it's really the first time that the page was accessed. I find it awkward and unsatisfactory. I would probably be the default checkbox value in a calculation before header with a query SQL NOT Exists condition to check if the page has previously accessed in the current session:

    select
        null
    from
        apex_workspace_activity_log
    where
        apex_session_id = :app_session
    and application_id = :app_id
    and page_id = :app_page_id
    
  • How to access the values in column fron a report (region)

    Hello

    In the region of report footer section, I want to access the value of a column (e.g. name col = COL01) for first place. I know that I can access total number of rows using #TOTAL_ROWS #. Is it possible to do this?

    Thanks in advance,
    Paresh

    Hello

    I did not have a v2 to try this out, but try this:

    1. in your report, add the following in the header of the region:

    <div id="TheReport">
    

    2 - in the foot of the region:

    </div>
    <script type="text/javascript">
    var t = document.getElementById("TheReport");
    var r = t.getElementsByTagName("TABLE")[1];
    var rows = r.rows;
    var tds = rows[0].cells;
    var k;
    if (tds)
    {
     for (k = 0; k < tds.length; k++)
     {
      if (tds[k].id == 'ENAME')
      {
        alert(rows[1].cells[k].innerHTML);
      }
     }
    }
    </script>
    

    Remove your old javascript code and replace line alert() with all you need to do with the value of .cells [k] .innerHTML lines [1].

    This includes in your report in a div tag The JavaScript find it and gets the second table (the table report is a table of the area which is now within the DIV tag). As older versions of the Summit has not used the attribute "headers" on cells, we check the ID values for the column headings in row [0] - once we found the right column, we retrieve the corresponding value according to the data in row of lines [1].

    Andy

  • "All the values in column" change in the dash prompt

    In OBIEE 11 g, how to change the dashboard prompt label everything value? I don't want to change the value in the XML file, because it will prompt value impact all the dashboard.
    This is there best method to implement this problem?

    For example:
    In prompt dashboard-> edit-> options-> check ' include "All values in the column" in the list ", so I can display value"(toutes les valeurs de colonne) ' in the command prompt. " Customers want to change this value, such as 'all values '. Is this possible? Thank you.

    Hello

    Can do this by using Union All is prompt, SQL and variable presentation in the report.

    Reference: http://www.varanasisaichand.com/2010/01/editing-all-choices-in-dashboard.html

    Kind regards
    Srikanth

  • ADF: Assigning the value of column VO to OutputText.

    Hi all

    I have a VO who im showing as ADF read Table only. And one column that VO should be included outside of this table, I mean, I don't want to include this column in the table that I want to assign the value of the column to Text output component (Active).
    I want to assign the value of the column to the output text component.
    How can I achieve this.
    I think im clear with my requirement.

    Any answer will be really grateful.

    Please read this before posting
    https://forums.Oracle.com/forums/Ann.jspa?annID=56

    am now back to the topic.

    tell as an example.
    Here, I had to employee vo drag and drop as readonly af:table employee.
    in this readonly af:table no need to show their id of employee, but you don't want to show this id used as some text output at the top / bottom of the table.
    I think reason?. as it comes to your condition.

    If am so right, moving later.
    Drag and drop the af: table without employee id. and then drag and drop the employee as af text id: output
    important: employee select id in the user interface that came out text go to partial property inspector trigger are at table.

    You may wonder why I like this mean?
    If you like this then means that move through the records of documents / select in af:table means revalent employee id get you. This way you get the desired results. :)

    Thanks & cordially
    ADF7.

  • Change the value of column select and insert different

    Hi all

    I've written a procedure where I am selecting values in other tables and inserting into a new table. The code is below
     
    If you see line 54 in the code, you will find the combined_bu_code is comes from a procedure and the value of BU is stored in prod. Table SEM_BACKLOG_LOG. I need to check, if the combined_bu_code came as PWR then insert as table BACKLOG_OTD_NEW POWER not as PWR.

    You are looking for assistance on this. Thanks in advance

    Concerning

    Published by: User_Apex on June 23, 2011 03:03

    Published by: User_Apex on June 23, 2011 03:53
    DECODE(SMTC_OTD_CHART.get_combined_bu_code(a.BU), 'PWR', 'POWER', SMTC_OTD_CHART.get_combined_bu_code(a.BU)) COMBINED_BU_CODE
    

    Kind regards
    Richard

    -----
    blog: http://blog.warp11.nl
    Twitter: @rhjmartens
    If you answer this question, please mark the thread as closed and give points where won...

  • Difference in the values of column MAX_SIZE and MAX_USED_SIZE in V$ SORT_SEGMENT

    Hello

    Anyone have an idea what is the difference between the value of the column MAX_SIZE and MAX_USED_SIZE to V$ SORT_SEGMENT?

    I checked in docs. The definition as:

    Taille_max Maximum NUMBER of extensions, never used

    Maximum number of MAX_USED_SIZE NUMBER of extensions used by all sorts

    I couldn't understand the difference by top definitaion.

    Thank you
    oratest

    My best guess is that MAX_SIZE is the total number of extensions that are used for any purpose, while MAX_SORT_SIZE is the total number of extensions already used for sorting.

    Consider that the temporary segments can be used for anything other than sorting. A temporary LOB of handling, storage medium for temporary tables, hash, fusion of bitmaps, etc., etc., are examples.

    Hope that helps,

    -Mark

  • Returns the value of column line

    Greetings!  I currently have a request we will tell

    SELECT value, period FROM MAS_CFUS_KEYACM_CONTROLDATA ORDER BY cf_keyword_ID

    RESULTS

    Period value

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

    100.0002 1 JANUARY 14

    -35.68 1 DECEMBER 14

    -1943.67 NOVEMBER 1, 14

    678.0013 OCTOBER 1, 14

    This continues for about 15 results by cf_keyword_ID.

    I'm looking to return the VALUE first in a new column called PREV1, the second value of PREV2, third in PREV3 and so on.  The same goes for the dates.  And all this for only the first 10 values of each cf_keyword_ID.  Can anyone suggest the best way to achieve this?

    Thank you!!

    Hello

    This is called pivoting.  Because I don't have a copy of your table test, I'll use scott.emp to illustrate.

    This shows the first 3 employees for each job, in order by hiredate, along with their hiredates:

    WITH relevant_data AS

    (

    SELECT ename, job, hiredate

    row_number () taken OVER (PARTITION OF work

    ORDER BY hiredate

    ) AS r_num

    FROM scott.emp

    )

    SELECT *.

    OF relevant_data

    PIVOT (MIN (ename) AS ename

    MIN (hiredate) AS hiredate

    FOR r_num (1, 2, 3)

    )

    ORDER BY job

    ;

    Output:

    WORK 1_ENAME 1_HIREDATE 2_ENAME 2_HIREDATE 3_ENAME 3_HIREDATE

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

    ANALYST FORD 3 December 1981 SCOTT April 19, 1987

    The CLERK SMITH December 17, 1980, 3 December 1981 JAMES MILLER January 23, 1982

    MANAGER JONES 2 April 1981 BLAKE 1 May 1981 CLARK June 9, 1981

    PRESIDENT KING November 17, 1981

    SELLER ALLEN 20 February 1981 WARD 22 February 1981 TURNER 08-Sep-1981

    There are actually more than 3 SECRETARIES and SALESMEN.  Which does not cause an error; the only first 3 are shown.

    As you can see, having less of 3 does not cause any errors, either.

    For more info on pivots, see the FAQ of the Forum:

    Re: 4. How can I convert rows to columns?

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    If yod post rather a problem using scott.emp, then you need not display the sample data; just results and explanations.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum:

    Re: 2. How can I ask a question in the forums?

  • How to extract the values of column aliases based on different column values?

    Hello gurus,

    I have a table with the following struture-
    "drop table T;
    create table T(Name, Symbol, Amount,dep) as select
    'Anderia', 'AA', 1050000,'HR' from dual union all select
    'Michael', 'ML',150000,'Sales' from DUAL union all select
    'Bill', 'BL', 1050000,'Finance' from dual union all select
    'Nancy', 'NY', 4000,'HR' from DUAL union all select
    'Anderia', 'AA',3000,'HR' from dual union all select
    'Michael', 'ML',1050000,'Sales' from DUAL union all select
    'Bill', 'BL', 1200000,'Finance' from DUAL union all select
    'Anderia', 'AA', 1200000,'HR' from DUAL union all select
    'Vish', 'VH', 1200000,'Marketing' from DUAL;"
    And try to find the values of the column as
    Name, symbol, dep, amount, % Total, Total $Cumm, rank but some additional as-columns

    Amount HR, % HRTotal, $HR Cumm Total,
    Finance amount, FinanceTotal %, $Finance Cumm Total
    Sales amount, a percentage of Total sales, $Sales Cumm Total.
    Amount marketing, MarketingTotal %, $Marketing Cumm Total

    then I use the following query to retrieve the name, the symbol, the dep, amount, % Total, Total $Cumm, rank columns.
    select name
         , decode(grouping(symbol), 0, symbol, 'Total') symbol
         , dep
         , sum(amount) amount
         , sum(per_total) "% Total"
         , decode(grouping(symbol), 0, max(Cum_per_total), null) "% Cumm Total"
         , decode(grouping(symbol), 0, max(rank), null) rank
      from (
              select name
                   , symbol
                , dep
                   , amount
                   , per_total 
                   , sum(per_total) over(order by rk) cum_per_total
                   , rank
                   , rk
                from (     
                        select name
                             , symbol
                    , dep
                             , sum(amount) amount
                             , round((sum(amount)/max(total_amount)) * 100,2) per_total
                             , dense_rank () over (order by sum(amount) desc) as rank
                             , row_number() over(order by sum(amount) desc) as rk
                          from (
                                 select name
                                      , symbol
                                      , amount
                          , dep
                                      , sum(amount) over() total_amount 
                                      , sum(amount) over () 
                                   from t
                               )
                         group 
                            by name, symbol, dep
                    )
            )
      group         
         by grouping sets((name, symbol, dep), ())
      order by rank, max(rk) nulls last
    But I want to extract the following columns so... How can I do?

    Amount HR, % HRTotal, $HR Cumm Total,
    Finance amount, FinanceTotal %, $Finance Cumm Total
    Sales amount, a percentage of Total sales, $Sales Cumm Total.
    Amount marketing, MarketingTotal %, $Marketing Cumm Total


    as I want that all records, then will the dep..do-specific I need to use the case here?
    Thanks for all your time and effort in advance

    If I understand your needs, you need pivot: SQL and PL/SQL FAQ

Maybe you are looking for