How to conditionally display a tab (or not) based on APP_USER?

Hi,
I want to put a condition on the display of a tab based on the value of APP_USER. There are two columns in the table and APP_USER must exist in one of these two columns in order for the tab to display. If APP_USER isn't in either of these 2 columns, the tab does not display. These 2 columns are different levels of management, and if the user isn't a manger, I don't want the tab to display.
Another requirement: APP_USER will be [email protected], but the values in the table are only firstname.lastname. So, I need to do a rtrim of APP_USER to remove @email.com.
I've tried several options, but can't seem to get it right. Suggestions?

From a database design aspect, that is a bad design. You should really create a column called "role" and then put the values in that column, ie Unlimited, limited, manager, user, readonly, etc.
then you queries would be:
select * from SH_EMPLOYEES where upper(USER_NAME) = upper(:APP_USER)
and role="Unlimited".
Else you will have to create a column for each new role you need. You really want to avoid using column name that are "intelligent". It doesn't make for a flexible design.

Similar Messages

  • How can I display images that are not included in any collection?

    How can I display images that are not included in any collection (some filter or smart collection)? A smart collection with parameters "Collection - contains - empty field" does not work. Lightroom 5.

    Thank you! Good idea! I ordered letters of the alphabet (space separated), and it works.

  • How we can display two list if not using blocked alv ,not scr painter

    how we can display two list if not using blocked alv ,not scr painter

    1. Once the cell number/service on the 3GS is transfered to the 5, the 3S will become basically an iPod touch until a new sim is in place, correct? We can still use wi-fi and the apps on the phone, and still be able to sync to iTunes, correct? iOS has been upgraded to 6.
    1a. With a new Sim, any issue with losing any data/apps on the phone? I dont' think so.
    1. Yes. without a sim it has no service, but all other features should be useable normally.
    1.a Nope, Data and Apps are independent of the Sim.
    2. Once the 5 is activated on the new carrier, how do I share the apps within iTunes? Is it as easy as using iCloud (which we haven't "activated" yet) and/or plugging both phones into iTunes and transferring between devices (authorizing both)? Photos? There are photos on the 3S that we will need on the 5.
    2. As long as both Phones use the same Apple ID, the applications can be synced to each through iTunes. Also any downloads on one phone should appear in the other. Again as long as both phones are using the same Apple ID.
    3. Reverse order for new apps purchased (understand that not all the iphone 5 apps will work on the 3GS)?
    3. If they can be run on the iPhone3GS they should be synced automatically.
    4. My husband also has a new iPad, any complications there with three devices? To date, he has not "shared" apps between his 3S and the iPad. He does not have iCloud set up, but plugs into his computer to backup and transfer photos. 
    4. If all 3 Devices share the same Apple ID all should be synced. 
    As a word of warning, if all 3 devices use the same Apple ID, messages recieved using iMessage will appear on all 3 devices.
    And Conctacts may get overwritten if synced to iCloud (thogh you say he doesn't have one), or merged together.

  • How to conditional display Report Region based on number of rows returned

    I have a page with two Report Regions.
    One Region should display if the Query returns 0-1000 rows. The other should display if the same Query returns more than 1000 rows.
    The only way I can figure out how to do this is have ANOTHER query in the conditions field for each Region to Select count(*) from etc.
    I know there is a #TOTAL_ROWS# value but that is only available after the Region is displayed. Is there some other built-in variable that can be used to put in the Conditions field or is doing duplicate SQL queries the only way?
    Any help would be appreciated.

    Rather than running your query 4 times (by embedding it in your condition), you can have a region that is not displayed, with a hidden item, and set the value of the item in a before header computation to the count of your query. Now you can conditionally display based upon the value of that item.
    -- Sharon

  • How can I display one of two DataTables based on criteria

    I have two DataTables. One DataTable should be displayed or the other DataTable should be displayed in the same JSP based on some criteria. I wish I could put an if statement in the JSP page but how else can I do this? Is there a JSF tag that is like an if statement?

    Hi
    Try to use rendered attribute.
    Create boolean variable in your bean ie private boolean showTab1And in jsp type
    <h:dataTable id="tab1" value="..." var="..."  rendered="#{myBean.showTab1}">
    </h:dataTable>
    <h:dataTable id="tab2" value="..." var="..."  rendered="#{!myBean.showTab1}">
    </h:dataTable>if showTab1 is true, first dataTable shows, otherwise second dataTable is shown.
    Hope it helps
    Martin
    ps. You can combine value of rendered :
    rendered="#{myBean.boolVar1 && myBean.boolVar2 && !myBean.boolvar3}"

  • How can I display date+time and not the point number in excell?

    Hi everyone,
    Could anybody tell me how I can save date + time to a file, so that  I can display on a diagram(excel) : date+time in (ox) and data (oy)? :
    My program sets in (ox) the point number and not the date+time....( although  date and time are written correctly in the column...)
    Any help would be great,
    Thanks,
    regards,
    Marc

    hi there,
    excel uses 01.01.1900 00:00 as the time offset, LabVIEW uses 01.01.1904 02:00, so you can't display the correct datetime in excel when you write the time as a fractional number of seconds from LabVIEW. you must format the datetime in LabVIEW to a string and write that to the column. use the "Format Date/Time String" - function and for example "%d.%m.%Y %H:%M:%S%3u" as the format string (see the functions help for more examples). you also could format your data to a string using "Format Into String" - function and write the file as a 2D string array. the decimal point you have to use depends on your system and its settings, but you can specify the decimal point in the Format string like "%.;%f" (means fractional number with point as decimal point).
    best regards
    chris 
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • How do I display Canvas Graphic image (Not Iconic button) from jar file

    Hi all,
    I am currently using Forms 10g.
    I have gone through the tutorials on how to add Button Icons into Jar files for web enables forms .....so far so good
    This however does not explain what I actually want to do... since "graphic images are by nature embeded in the for rather than referenced ......so here goes ..
    I have a forms 10g application where all the individual form modules/canvases display a big banner (covering top 20% of the screen). This was done by importing the image straight unto the content canvases. As you know this now becomes a "graphic Image" now embeded(& not referenced by file name) on the canvas. Also bear in mind that this is actually different from an "Image Item" which is a block object.
    I dont know if this is possible, but what steps do i follow to make the image part of a jar file as opposed to my current situation. Please let me know if possible or not so I stop waisting development time looking for answers :)
    Another question is how do i make this jar file a library object so that we can vary the image as we wish
    NB: one other trick which i can think of is to create a giant push button across the screen to display the image and then stick it in a jar file !
    Cheers
    css_jay99

    I don't know about embedded images imported in from the builder, but there is a way to use READ_IMAGE_FILE into a BLOCK.IMAGE_ITEM where the images are all in a jar file stored on the OAS.
    Metalink Note:137397.1 explains it in details.
    Tony

  • How can I display the 11000+ "items not shown?"

    I have Elements 7 and running Windows 7 64bit. "Show all" only shows a couple of thousand photos and 11000+ "items not shown."  I have never stacked or hidden any photos.  I've tried everything.  The "show hidden" gives me 0 photos.  When I ask to show a tag of some of the missing photos, I again get 0. The photos are not shown in any of the views.  When I try to reimport the photos, it says they are already there. I need help desperately. I've put too much work into this organizer to start from scratch.

    Thanks for the reply and the terrific FAQ source.  I followed the directions suggested, but things actually got worse.  When I tried display all, I got 0 photos - nada - zip.  I kept messing around and finally success.  I tried so many combinations of things that I'm not sure which actually solved the problem, but I believe it was reconnect all.  I had tried this a couple of times before without success, but this time I deleted from the catalog all items elements couldn't find, even though I knew where they were.  Lo and behold all 13000 photos appeared.  BTW many of those are duplicates.

  • How to display a DIV or not, based on whether a logging session cookie exists or not?

    Hi everyone
    I have created a logging system for a simple CMS using Dreamweaver server behaviours.
    My problem :
    When logged in, I would like to show on my pages a DIV saying something like "You are logged in". If not logged in, I would like a different DIV with this text saying "Please log in"
    I have simplified the problem as much as I could. Basically, I would like to show something or to hide it and show another thing based on whether the logging session exists or not. Would someone have a simple answer to this problem?
    Much obliged, W

    Thanks HJ
    Your answer helped me find more info about cookies and session which is what I actually needed.
    So I can show a particular item based on whether an admin user is logged in, I proceed as follow.
    First I check whethet the session exists. If he has just logged in using Dreamweaver logging system, the session will exist. So put the text above the <head> and preferably at the very top of the page.
    <?php
    if (!isset($_SESSION)) {
      session_start();
    ?>
    Then in the content portion of the page where I want to display, say a DIV with some content for the administrator I place the following :
    <?php
    $accessLevels = array('a','b');
    $validLevel = $_SESSION['MM_UserGroup'];
    if(array_search($validLevel, $accessLevels)>-1){
    ?>
    <div id="amendPage" style="margin-left:0;margin-top:0;height:20px;"><a href="/admin/changePage.php">Changez le contenu de cette page</a></div>
    <?php
    ?>
    I am checking here whether the user is logged in based on his or her access level which I have previously set in the database. 'a' being an access level and 'b' an other one which might enable more things. So I can play with this array to show something to someone based on the access level.
    If I were to remove 'b' from the array, the div would only be visible when a user with an 'a' access level is logged in and vice versa.
    Not sure whether this is a good option, but it works for me

  • How do I reload _all_ tabs? Not just the current tab.

    While reading a blog, I'll open all the interesting conversations. If I'm away from the computer for a few hours, I want to refresh all the tabs with one click - not page by page by page. Thanks.

    This can be done by right-clicking on a tab and selecting "Reload All Tabs"

  • How can I display ONLY bookmarks, and not History?

    I'm sorry to ask a question with probably such an obvious answer, but I have never been able to figure this out. I want to display all my bookmarks so I can do a search & find the right page. But I always get my entire list of every page I've ever visited. I don't want to delete my history, but I want to only show real bookmarked pages.
    Here's what I've been doing: I select "Show ALl Bookmarks." Then I select a folder on the left under the header "BOOKMARKS." It still shows all the pages I've visited today.
    Thanks.

    After you enter the search criteria make sure you click on Bookmark Menu in the upper left of the coverflow window.

  • How do I display an image in Numbers based on the value of another cell?

    Here is the situation. I have a list of names in one table. I then have a table of pictures of corresponding to each name. I then have a drop down list in a cell with each of the names in it. I would like to be able to click the drop down list, select a name, and then have the corresponding picture be displayed in a cell. How would I go about doing this?
    Late 2013 rMBP with fully up to date software.

    not possible.  I have wanted to do this myself.  You can post feedback to Apple using the menu item "Numbers > Provide Numbers Feedback"

  • Conditionally displaying tabs

    I have a page that I want to call in two different methods.
    1. I want to display the page with tabs
    2. I want to display the page as a popup and therfore do not want the tabs to display.
    Is it possible to conditionally display the tabs?
    Thanks

    Brian,
    Standard Tabs and Parent Tabs both have condition attributes. If your popup page URLs can include a certain keyword in the request value field (between session ID and debug positions in the f?p URL), you could make the tabs conditional on that request value.
    Scott

  • Need help with conditional display

    I found a older thread (704012) that explains how to conditionally display a link using style.  Which is what I want to do.  The part I'm having trouble with is that part of the instructions say to put
    class="row_has_values_#HAS_VALUES#"
    in the Link Attributes which I have done.  I also have a column in the report called HAS_VALUES and I'm properly populating it in my select.  I know because I left it displayed while I'm testing.  I can run the report and I have Y's and N's showing up in that column but the conditional part does not work.  When I look at the page source (below) I see that in the html the #HAS_VALUES# has not been replaced by the actual Y or N.  I think that's where I'm having trouble?  I think it might work if there was a Y or N in that but I don't understand why that didn't happen.
    <tr class="odd"><td headers="LINK"><a href="f?p=125:3:12628966088981::NO::P3_PROGRAM_KEY:2" class="row_has_values_#HAS_VALUES#"><img src="/i/e2.gif"  border="0"></a></td><td  align="left"

    LawrenceJ wrote:
    I've continued to snoop around and see lots of posts on conditional display in reports.  Common desire I guess.  I saw some stuff that I interpreted to suggest that what I'm trying to do may not work in interactive reports, only in classic reports.  Does that sound familiar?
    That would certainly apply to anything template-related. However there have been enhancements to IRs (like adding HTML Expressions) that might supersede information in older posts. If you provide a link to the sources you've found and the APEX version you're using someone will be able to confirm whether that information is relevant.
    Many other posts on doing things conditionally in reports seemed to lean towards "selecting" the html based on data values and then just letting that get put in the report column.  That looks promising but sure is a bit ugly.  I've very little apex experience but lots of mod pl/sql and that sort of solution was pretty common when I did stuff with it.  I saw a little suggesting using templates as a solution but I'll confess to not understanding it at all.
    As I pointed out in the original thread, if the conditional display of the link is in any way security related then CSS or JS/jQuery methods are not acceptable. If the user is not supposed to be able to click the link or see any data contained in it, then you have to use a method that ensures that the link element never reaches the browser.
    Hard-coding the link HTML in the report query is the common approach, but is as you say a bit ugly. Using a custom report template (my favourite APEX subject) enables clean separation of the report query, conditional logic and HTML structure. If you know HTML then you're advised to get familiar with using templates in APEX. You'll find this a major advance on the PL/SQL web toolkit. What is it that you're not understanding about using templates?

  • 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

Maybe you are looking for

  • Controlling report output based on current user

    Hi all, I am building a small app with APEX for a sales team. We have the site and app hosted by another company. I have built a report showing sales summary for the company. The problem is that the report is showing all sales for all sales people. W

  • Table ui element in webdynpro java.

    Hi Friends, I am krishna i am working as sap webdynpro abap consultant . But right now i got the requirement on sap webdynpro java.   so please give me the required details. Here are my questions. 1. how to populate the data into the table. 2. and th

  • Vendor Evaluation on QM notification type

    Dear Experts, Is it possible to add another type of QM notification in the vendor evaluation or only the F2 can be considerer? We are thinking in getting another type of QM notification in the evaluation achievment. Kind regards to all Oliver F

  • Photo Frame

    Hi Can anyone tell me if PR5 can make photo frame as PR 2 you could easily make a photo frame by going into video effects and in the Transform folder you could chose Clip apply it to your photo or video on the time line then adjust how thick you want

  • How can I buy music charged to a itunes card instead of my credit card??

    How can I buy music charged to a itunes card instead of my credit card??