Conditionally Hide Regions based on :APP_USER

Hey Guys,
I have a pretty straight-forward question. I'm trying to hide a region unless the user = "ADMIN_JOHN" OR "ADMIN_TOM". Can someone please tell me: 1.) the condition type, 2.) what to write into expression 1 (and possibly expression 2).
I've tried a ton of things, I must just be getting using the wrong syntax.
Example:
Condition type: Value of Item in Expression 1 = Expression 2
Expression 1:   :APP_USER
Expression 2:   "ADMIN_TOM" or "ADMIN_JOHN"Thanks a lot,
Mauricio

Hello Mauricio,
Try this:
Condition type: Value of Item in Expression 1 is Contained within Colon Delimted List
Expression 1: APP_USER
Expression 2: ADMIN_TOM:ADMIN_JOHN
Greetings,
Roel
http://roelhartman.blogspot.com/

Similar Messages

  • Dynamic action - show/hide region based on LOV which returns ID

    Hi folks,
    this should be simple, so someone who works with dynamic actions.
    I have a LOV which is based on below query:
    select OBJECT_ID, KOD
      from x_data x;
    retuns:
       ID          KOD
        492961 BMW
        492964 VOLVO
        492960 MERCEDES
        492963 VOLKSWAGEN
        492959 SKODAItem :P200_KOD is based on LOV which displays KOD and returns ID.
    On my page I have also 1 region called TEST_REGION.
    I would like to set up a dynamic action shich will SHOW/HIDE a TEST_REGION based on selected value in item :P200_KOD (LOV). Region should be showed if displayed (KOD) value of selected ID starts with 'V%'
    By other words, if below query returns any record, then SHOW, else HIDE:
       select *
        from x_data x
      where x.kod like 'V%'
         and x.object_id = :P200_KOD;How should I define a triggering condition for dynamic action, for item :P200_KOD?
    Thanks,
    Tomas

    Hi,
    One way:
    Create advanced dynamic action.
    Name : Hide region
    Event : Change
    Selection Type : Item(s)
    Items(s) : P200_KOD
    Condition : JavaScript Expression
    Value :
    $(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"Action : Hide
    Fire On Page Load : True
    Hide all page items on the same line : No
    False Action : Show
    Fire On Page Load : True
    Show all page items on the same line : No
    Selection Type : Region
    Region : TEST_REGION
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Show/ Hide region based on button click

    Hi,
    I have two report regions. When I press generate report button then, one region has to be displayed.
    I have an item "select list with submit " and if select some value from the LOV in the select list then the second region has to be displayed. Over all only one region has to be displayed at a time.
    Thanks in advance.

    See this thread for a possible answer: Hide/Show Region With Javascript
    Thank you,
    Tony Miller
    Webster, TX

  • Display and hide regions based on recordset results

    I am having problems with the server behavior. I am using CS3. Has anyone else ever had this problem, and if so what was the work around? Everytime I try to use the Show If Recordset Is Empty, it knocks me off DW.
    I even tried to use this code so it would go to another page if the recordset was empty.
    <% If rs_Search_Data.BOF AND rs_Search_Data.EOF Then
       response.redirect("delete_data_no_results.asp")
       End If
    %>
    Please help!

    >I even tried to use this code so it
    >would go to another page if the recordset was empty.
    What happens when you run that code?

  • SQL Query (updateable report) Region - Conditionally Hide and Set Values

    SQL Query (updateable report) Region - Conditionally Hide and Set Values
    Outline of requirement :-
    Master / Detail page with Detail updated on same page using SQL Query (updateable report).
    The detail region has the following source
    SELECT item_id,
           contract_id,
           CASE WHEN hardware_id IS NOT NULL THEN
                   'HA'
                WHEN backup_dev_id IS NOT NULL THEN
                   'BD'
                WHEN hardware_os_id IS NOT NULL THEN
                   'HS'
           END item_type,
           hardware_id,
           backup_dev_id,
           hardware_os_id
    FROM   "#OWNER#".support_items
    WHERE  contract_id = :P26_CONTRACT_IDThe table support_items implements arced relationships and has the following columns
    CREATE TABLE SUPPORT_ITEMS
      ITEM_ID         NUMBER                        NOT NULL,
      CONTRACT_ID     NUMBER                        NOT NULL,
      HARDWARE_ID     NUMBER,
      BACKUP_DEV_ID   NUMBER,
      HARDWARE_OS_ID  NUMBER
    )A check type constaint on support_items ensures that only one of the fk's is present.
          (    hardware_id    IS NOT NULL
           AND backup_dev_id  IS NULL
           AND hardware_os_id IS NULL
    OR    (    hardware_id    IS NULL
           AND backup_dev_id  IS NOT NULL
           AND hardware_os_id IS NULL
    OR    (    hardware_id    IS NULL
           AND backup_dev_id  IS NULL
           AND hardware_os_id IS NOT NULL
          )    Hardware_Id is a FK to Hardware_Assets
    Backup_dev_id is a FK to Backup_Devices
    Hardware_os_id is a FK to Hardware_op_systems
    The Tabular Form Element based on item_type column of SQL query is Displayed As Select List (based on LOV) referencing a named list of values which have the following properties
    Display Value     Return Value
    Hardware Asset    HA
    Backup Device     BD
    Computer System   HSThe Tabular Form Elements for the report attributes for hardware_id, backup_dev_id and hardware_os_id are all Displayed As Select List (Based on LOV).
    What I want to do is only display the Select List for the FK depending on the value of the Select List on Item Type, e.g.
    Item_Type is 'HA' then display Select List for hardware_id, do not display and set to NULL the Select Lists for backup_dev_id and hardware_os_id.
    Item_Type is 'BB' then display Select List for backup_dev_id, do not display and set to NULL the Select Lists for hardware_id and hardware_os_id.
    Item_Type is 'HS' then display Select List for hardware_os_id, do not display and set to NULL the Select Lists backup_dev_id and hardware_id.
    There are properties on elements to conditionally display it but how do we reference the values of the SQL query Updateable region? they are not given a page item name?
    Also on the Tabular For Elements there is an Edit tick against a report item - however when you go to the Column Attributes there is not a property with which you can control the Edit setting.
    What's the best way of implementing this requirement in APEX 3.1?
    Thanks.

    >
    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "user13515136".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I have a multi-row region that displays values and allows entries in a number of fields.Provide exact details of how this has been implemented. (An example on apex.oracle.com is always a good way to do this.)
    I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done? Almost anything can be done, often in multiple ways. Which are appropriate may be dependent on a particular implementation, the skills available to implement it, and the effort you're willing to expend on it. Hence it's necessary to provide full details of what you've done so far...

  • Conditionally Hide/Display fields in a region

    How can I conditionally hide/display fields in a region. Based on a user selection whether they want to 'Enter' or 'Select', I want to dispaly the appropriate field .i.e. if the user selects 'Enter' then I want to display a Text field and if they opt for 'Select', then I want to display a Select list.
    Thanks in Advance.
    Regards,
    Hilal

    Hi Halil,
    I've been trying to reproduce what the linked site does.
    Here's my solution:
    1 - Add all items to the page whether or not they are going to be displayed
    2 - Ensure that all items that could be shown/hidden are on lines on their own (ie, set New Line to Yes)
    3 - In the region's Region Footer (or in a new HTML region in the Before Footer position), add in this bit of javascript:
    &lt;script type="text/javascript"&gt;
    html_HideItemRow('NameOfFieldToHide');
    -- repeat for each item to be hidden when the page first loads
    &lt;/script&gt;
    4 - On the radio button's definition, add the following in the HTML Form Element Attributes setting:
    onclick="html_ToggleItemRow('NameOfDisplayedItem');html_ToggleItemRow('NameOfHiddenItem');"
    Now when the page is loaded, one field is automatically hidden then clicking any of the radio button options will toggle the hidden/displayed fields and their labels.
    As stated before, if you do a View Source on the linked application's page, you will see either more methods that are used to show/hide items/regions, but the above should be a starting point for you.
    Regards
    Andy

  • Conditional region based on an application item

    Hi All
    I want control the display of a report region based on the value of a global item. The item is set to the strings 'TRUE' or 'FALSE'.
    In the region I have tried pl/sql expresion :item = 'TRUE'
    and also value of expression1 = expression2 and still no joy.
    What am I doing wrong ?
    TIA
    Asif

    Asif,
    The first technique should work. The second should be 'Value of Item in Expression 1 equals Expression 2'.
    Maybe you are checking the wrong case ('true' vs 'TRUE') or the application item has no value.
    Scott

  • JavaScript to Hide Region

    I would like to hide an entire region based upon JavaScript. I can't use the conditional display of a region because this is on-demand and can't submit the page to check value. I can hide specific values, but the labels remain and the region border remains. Here is what I have so far.
    onchange="Show_On_Selectlist_Value('P15_SIRT_DCSN_ID','6');"
    <script>
    function Show_On_Selectlist_Value(pParent, pValue)
    var rv = $x(pParent).value;
    if (rv == pValue)
    html_ShowElement('P15_RR_COMMENTS');
    html_ShowElement('P15_RR_USER');
    html_ShowElement('P15_RR_DATE');
    else
    html_HideElement('P15_RR_COMMENTS');
    html_HideElement('P15_RR_USER');
    html_HideElement('P15_RR_DATE');
    </script>

    For the region you want to hide, provide a value for the 'Static ID' attribute. You can then use the built-in javascript functions '$x_Hide(pnd) and $x_Show(pnd) 'to display or hide this region.
    example $x_Hide('REGION_STATIC_ID') http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/javascript_api.htm#CHDDAGFE
    varad

  • Change template type of region based on item value

    Hi All,
    Is it possible to change a template type of a region based on value of page item?
    For example, if I have a template type for Region A as Hide/Show region and template type for Region B as Hide/Show as well.
    I want the template type of Region B to be changed to a custom template type based on the value of an item in Region A.
    Is this possible?
    Appreciate your inputs.
    Thanks!

    spriya wrote:
    Hi All,
    Is it possible to change a template type of a region based on value of page item?
    For example, if I have a template type for Region A as Hide/Show region and template type for Region B as Hide/Show as well.
    I want the template type of Region B to be changed to a custom template type based on the value of an item in Region A.
    Is this possible?No. You'd either need to have 2 instances of Region B based on different templates, and render one of them conditionally according to the Region A value; or develop a single template with a structure flexible enough to be used in both cases, and change its appearance/behaviour by for example, swapping classes in a Dynamic Action.

  • Dynamically show/hide regions out of the application workflow

    hi,
    is it possible to show/hide regions of a page dynamically with a "select list with submit" item?
    regards

    Hi,
    Do you mean "Conditionally display" items based on the value of a Select List with Submit?
    Andy

  • How to conditionally hide/show form item for multiple requests?

    Ver 4.1.0
    Hi There,
    I have a database form where in one of the fields I need to hide /show based on if the user selects a copy row option or create a new row.
    To explain in details,
    1. I have a report and form application created. When the user edits a record, in that page I have added a copy button also, so when the user hits the copy button, the page is reloaded where the user can create a new record with the save button disable and the create button visible. when the user submits the form using Copy the request is set to "COPY' and in the form, one of the fields has conditional display "REQUEST =Expression1" with value "COPY" This works fine.
    2. However, on the reports page, there is a "CREATE" button also, where the user can directly create a new record and the request value is "CREATE"
    I wanted to add both COPY and CREATE to the conditional display something like
    "REQUEST=Expression1" with value "COPY, CREATE" (without quotes)
    however, the item does not display. I guess it only accepts one value since its =.
    Any suggestions on how the conditional display for an item can be done based on multiple request types?
    Thanks!
    Sun
    Edited by: ryansun on Oct 18, 2012 3:08 AM

    Hi Sun,
    Try changing your condition to a PL/SQL Expression and in expression 1 field add something similar to below and see if it works:
      :REQUEST like 'CREATE' or :REQUEST like 'COPY'This is straight off the top of my head and untested.
    Hope this helps
    Paul

  • Hide Tabs based on a table driven customer access

    Hi,
    I want some of the tabs to be hidden based on user profile that I've saved in a table... in the table I've identified user name (that I am comparing against the login user name) and in one of the columns I've identified if they should have access to the tab or not (by entering "Y" against the user names that should have access to the table)... Table looks something like this:
    Table Name: Table_A
    User_Name Tab_Access
    ABC
    BCD Y
    XYZ Y
    EFG
    (note: based on the above table only users BCD and XYZ should see the tab for the rest it should be hidden)
    To accomplish the above, I've put following PL/SQL code under "Conditional Tab Display"
    APEX_UTIL.Get_First_Name(:APP_USER)||' '||APEX_UTIL.Get_Last_Name(:APP_USER) in (select User_Name from Table_A where Tab_Access = 'Y)
    and set Tab Display Condition to PL/SQL expression
    and got the following error message:
    Invalid PL/SQL expression condition: ORA-06550: line 1, column 114: PLS-00405: sub query not allowed in this context ORA-06550: line 1, column 7: PL/SQL: Statement ignored
    when I changed the above PL/SQL statement to something like this (it worked):
    APEX_UTIL.Get_First_Name(:APP_USER)||' '||APEX_UTIL.Get_Last_Name(:APP_USER) in ('BCD', 'XYZ')
    Please advice

    Hi,
    Try this for Conditional Tab Display:
    Condition Type: Exists(SQL Query returns at least one row)
    Expression 1:
    select 1 from Table_A
    where Tab_Access = 'Y' and
    User_Name = APEX_UTIL.Get_First_Name(:APP_USER)||' '||APEX_UTIL.Get_Last_Name(:APP_USER)Update your forum profile with a real handle instead of "qwe12654".
    Use [url http://wikis.sun.com/display/Forums/Forums+FAQ]formatting tags for code to indicate the code you are using.
    Hope it helps!
    Regards,
    Kiran

  • How to conditionally hide tabs in Webi

    We have got a requirement to hide the tabs in WEBI based on userlogins.
    Currently we have 2 tabs with 3 to 4 charts in each tab.
    Requirement:
    1. Conditionally hide the tabs based on user profile.
    2. Conditionally hide the charts based on data privileges.
    Is this possible in Webi or a work around?

    http://scn.sap.com/community/businessobjects-web-intelligence/blog/2013/05/28/customizing-the-web-intelligence-ui-in-bi-41
    Since BI 4.1 you can go to a group and "customize" the view for each group. but as far I know this cannot be controlled by a formule or condition, just check or not and it is related with the applications and not on a specific report.

  • Conditionally hide subtotal row

    I am creating a new analysis where I want to conditionally hide a subtotal row in a pivot table view. I have two columns - Is Consolidated and Property Name. Properties can be consolidated or not so I have Is Consolidated as an attribute (values True or False) and I add both to an pivot table view of an analysis. I made Is Consolidated so that it has subtotals after and then hide the Is Consolidated column so that the pivot table view looks like so:
    Property A
    Property B
    Property C
    True Total
    Property D
    Property E
    False Total
    Grand Total
    However, I want the report to look like so (don't show the False Total line):
    Property A
    Property B
    Property C
    True Total
    Property D
    Property E
    Grand Total
    I found the following - http://gerardnico.com/wiki/dat/obiee/answer_xml but my situation is a little different and when I pull the equation out it never finds it so it doesn't ever apply the conditional formatting.
    Is this possible?

    950121 wrote:
    I don't understand what you're proposing. With this implementation I get the error "Numbers of columns and their data types must be consistent across all criteria and Result Columns".Most detailed steps I could write :)
    1) Login in OBIEE analytics.
    2) Create a new analysis/answers using the subject area that the report should be built out of.
    3) In the criteria tab for the Report 1, drag the following columns: Property Column, and Fact Metric.
    4) For the fact metric column, click on FX and write the following formulae: FILTER(Metric using Flag = 'TRUE')
    5) Create all the filters as you need for this based on the prompts provided on the dashboard page
    Time to create second report to display the subtotal:
    6) Click on combine with similar request and select the same subject area and this will create second line of reports below the result columns.
    7) The concept here is, you can do an union of reports as long as all the reports have same set of columns and matching datatype's.
    8) Now select any column from subject area that is of type character, and obviously the second column which is the metric.
    9) Click on Fx on the first column and change it to 'Total' to hardcode it. Change the fx of the second column to FILTER(METRIC USING FLAG = 'TRUE')
    Time to create third report:
    10) Click on edit, and click on Add new criteria to add third line of report in the result columns set.
    11) Now repeat the steps in the first report, and change the metric to filter by 'FALSE' instead of true.
    12) Apply the same set of prompts across 2 and 3 reports also.
    Apply the formatting on the result columns per your requirement.
    Thanks.

  • Hide region if no data found in another region

    I have 2 regions on a page.. I'd like to hide the second region if no data is returned by the SQL query in the first region.
    I know that the obivious way to do this is to use the same SQL in the second region and make it conditionally display. But I don't want to run the SQL twice against the database for performance reasons.
    Is there any (preferably easy) way to check the contents of Region 1 from Region 2 and hide Region 2 if Region 1 has no data in?

    Hello,
    You can write a javascript function, that will check whether you report has any rows, if not will some APEX flag item.
    For example, after the report will be fetched you can write something like this:
    <script type="text/javascript">
    var els = document.getElementById('R1708927825979432').rows;
    if (els==0){document.getElementById('P1_FLAG').value=0;}
    </script>
    I'm not exactly sure that it will work, but you can try....
    Best Regards, Kostya Proskudin.

Maybe you are looking for

  • Email Integration VS Groupware Integration in CRM 4.0

    We have a requirement to replicate certain business activity types created in CRM thru' Portal interface to Lotus Notes as Calendar entries. We are in the process of configuring the Groupware integration part to accomplish this. The questions are...

  • Watching  purchased iTune movies with no internet

    I bought a Lacinema external HD because they said you could watch MP4 movies with it. I purchased 3 seasons of TV shows and several movies only to find that it won't play movies from iTunes. Please help me. I have spent soooo much money at iTunes, an

  • Disabling of  Rows in a JTable

    Hi, I have a JTextField which shows some value like 46,160.00 how to get this kind of format in my textfield. Regards, vc

  • Can we transport a smartform between IDES and DEV

    Hi experts ,                 as we got a problem in Dev syst , i had developed a samrtform in IDES. Can any one tell me tht ...Is there any way to transport a smartform from IDES TO DEV system or should i develop from scratch in DEV. regards, shashan

  • Retrieve data from R3 to XI using RFC

    Hi, I want to get data out from R3 to XI through RFCs or even using idocs. I have done RFC configurations in abap using SM59 with XI as destination. I am not sure whether its right. Please guide me as to how to get data out of R3 by first sending the