Show/hide based on Multiple selections in a select box

In my http header I have the following code...
it works great as long as only one value is selected:
if you highlight the ARRAMO value the DUNS field appears...
if you highlight anything else the DUNS field disappears...
but if I highlight both ARRAMO and another field, I want the DUNS to SHOW and it DOESNT..
how do I fix this?
<script type="text/javascript" src="#WORKSPACE_IMAGES#jquery-1.3.2.min.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
htmldb_delete_message='"DELETE_CONFIRM_MSG"';
//-->
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#P1_DUNS_NUMBER').attr("disabled", true);
$('label[for=P1_DUNS_NUMBER],#P1_DUNS_NUMBER').hide();
$('#P1_APP_REQUESTED').change(function(){
if($(this).val() == 'ARRAMO'){
$('#P1_DUNS_NUMBER').attr("disabled", false);
$('label[for=P1_DUNS_NUMBER],#P1_DUNS_NUMBER').show();
}else{
$('#P1_DUNS_NUMBER').attr("disabled", true);
$('label[for=P1_DUNS_NUMBER],#P1_DUNS_NUMBER').hide();
</script>

Using LOV, you can have multiple selection.
For this you can write code in the KEY-LISTVAL trigger.
Create an LOV for store code.
In the text-item of store_code (where you want mul. selection), you assign the LOV to that item.
In key-listval trigger,
You can have something like
Declare
m_val varchar2(1000);
a boolean;
Begin
m_val := :store_code;
a := show_lov('STORE_LOV');
if a then
  If m_val is null then
     m_val := :store_code;
  else
      If instr(','||m_val||',' ,||','||:store_code||',') = 0   /*check whether store code already selected, to get excat string comma is concatenated*/
         m_val := m_val||','||:store_code;
      end if;
  end if;
end if;
:store_code := m_val;
End;Note :To check for validation, additional coding is required...

Similar Messages

  • Diplaying region content based on multiple selection lists

    Hi,
    I have 3 select list on submit(P1A, P1B, P1C). And i have 3 report regions.
    now this is the scenario. the 3 select lists are on submit.
    the P1C is a dynamic list which shows contents based on the selection from P1A and/or P1B. so this is how my P1C LOV looks like
    SELECT DISTINCT COLLECTION d, COLLECTION v
    FROM viewvs
    WHERE (YEAR =   :P1A  OR  :P1A= '-1' )
    AND   (SEASON =  :P1B  OR  :P1B= '-1' )
    ORDER BY d i also have a 3 report regions which display result based on P1C selection.
    now when i select P1C then i am able to see the 3 regions. and when i go back and change P1A and/or P1B, then P1C changes output. and the 3 regions should not show any data unless i again select one from P1C but, the 3 regions still hold on to the previous data.
    what i am trying to say is, when the regions should display data only when P1C is selected, and when any of P1A or P1B is changed the regions should disappear and should not display any data, but instead the 3 regions show the previous data unless a new selection is done.
    How can i clear the report region when everytime a new value is selected from P1A and/or P1B.
    also the below is part of what i have entered in the report regions
    IF :P1C != 'NULL' THEN
    --DISPLAY THESE VALUES
    END IF;---------
    this is what i found the latest. whats happeneing is
    when i select listA, listB-- listC gets populated and when i select from listC based on that value which gets stored in session state, report regions get displayed
    but when i go back and change selection in listA, listB
    by default listC session value should go to NULL, and only after i make a new selection, then with this new session value for listC, the report regions get displayed.
    but when i checked the session value for listC, it still remains the same old value from the previous selection, because i haven't nade new selection and thats why the report regions are still showing the old result.
    so how can i remove this session value for listC after displaying the report results.
    Thanks,
    Philip.
    Message was edited by:
    [email protected]

    There is nothing wrong with your code, so I'd look elsewhere for the problem. Is this a direct copy of what you have on your page?
    :P1_COMBO1 in ('Option 1', 'Option 2')
    And
    :P1_COMBO2 = 'Option Combo 2'And the page item values are exactly as you have in the quoted strings? You might run the page in debug and confirm the page item values are exact.
    Edited by: Bob37 on Dec 6, 2011 2:18 PM

  • How can I see the numbers of lines selected in a Multiple Selection Box?

    Hi everybody,
    what I want to do is to get in an array of numbers all the lines selected.
    For instance, if I select the rows 1,4 and 7 from a Multiple Selection Box
    of 10 rows in total, how can I see that array when the rows 1,4 and 7 are
    selected?
    Because I want to connect this numbers to Case Structure and if the only
    rows selected are 1,4 and 7, the Case Structure will only realize this cases,
    and the rest will be ignored.
    I'm sure there is some way to get what I want.
    Thank you for your helpful.

    THANK YOU VERY MUCH. IT WORKS PERFECTLY!!!
    "Dennis Knutson" wrote:
    >>If you just wire the list box to an array indicator, you will see that
    the>output is an array of the selected items. Auto index the array through
    a>for loop that has your case statement inside.>>Dennis Knutson>>"Carlos
    Jorge" wrote>>Hi everybody,>>what I want to do is to
    get in an array of numbers all the>lines selected.>For instance, if I select
    the rows 1,4 and 7 from a Multiple>Selection Box>of 10 rows in total, how
    can I see that array when the rows>1,4 and 7 are>selected?>>Because I want
    to connect this numbers to Case Structure>and if the only>rows selected are
    1,4 and 7, the Case Structure will only>realize this cases,>and
    the rest
    will be ignored.>>I'm sure there is some>way to get what I want.>>Thank you
    for your helpful.>>

  • Multiple Select boxes in one form

    Does anyone know if it is possible to have multiple select
    boxes inside one form? I have six different select boxes that are
    generated by six separate queries. The action page for all six
    select boxes is the same so I just want one submit button so users
    don't get confuse. I don't want to cluster up the page with submit
    buttons but I may resort to that option.
    My problem is the select boxes generate a number and when
    that number is submitted I want to pass two other variables with it
    to the action page. I tried putting a "Form" tag around the 6
    select boxes. Inside each select box I tried to add an "Input
    type="hidden"" and give thte name and values that I needed. That
    worked for the first select box but when I tried the second select
    box it used the hidden values for the first select box.
    If anyone can help, I would greatly appreciate it. Or if you
    have any other suggestions I am open to any.
    Thanks

    Paross1,
    I wasn't thinking about that and you gave me a great idea.
    Here is how I changed my select boxes.
    <cfform
    action="Resolution_History.cfm?year=#year#&sessiontype=#sessiontype#&btype=res"
    name="form">
    <select name="SRINPUT">
    <option value="">SR
    <CFOUTPUT Query="findSR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="HRINPUT">
    <option value="">HR
    <CFOUTPUT Query="findHR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="SCRINPUT">
    <option value="">SCR
    <CFOUTPUT Query="findSCR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <br>
    <select name="HCRINPUT">
    <option value="">HCR
    <CFOUTPUT Query="findHCR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="SJRINPUT">
    <option value="">SJR
    <CFOUTPUT Query="findSJR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="HJRINPUT">
    <option value="">HJR
    <CFOUTPUT Query="findHJR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <INPUT TYPE="Submit" VALUE="Submit" alt="submit
    button">
    </cfform>
    On the action page I need the below IF statement to work so
    it will set the variables. It isn't working at this time. Its not
    bringing the values of billnumber, houseorig or the billtype.
    Do you have any thoughts? I know it is close. I need to set
    all of the inputs to input4 to generate my queries.
    <cfif form.srinput gt 0>
    <cfset houseorig eq "s">
    <cfset billtype eq "r">
    <cfset srinput eq input4>
    <cfelseif form.hrinput gt 0>
    <cfset houseorig eq "h">
    <cfset billtype eq "r">
    <cfset hrinput eq input4>
    <cfelseif form.scrinput gt 0>
    <cfset houseorig eq "sc">
    <cfset billtype eq "r">
    <cfset scrinput eq input4>
    <cfelseif form.hcrinput gt 0>
    <cfset houseorig eq "hc">
    <cfset billtype eq "r">
    <cfset hcrinput eq input4>
    <cfelseif form.sjrinput gt 0>
    <cfset houseorig eq "sj">
    <cfset billtype eq "r">
    <cfset sjrinput eq input4>
    <cfelse>
    <cfset houseorig eq "hj">
    <cfset billtype eq "r">
    <cfset hjrinput eq input4>
    </cfif>

  • Multiple selection box

    is there a way to use a multiple selection box and calculate values in a text box.
    I did set up a rule to set values but I won't work for my need.
    so multiple selection box has pc1, pc2, pc 3. The user can select all of these or just one but no matter what selection is made the price is calculated into another box on the InfoPath form, I assume either a text box or a calculated field box?
    any help or guidance would be greatly appreciated!!
    Ray

    Hi Little_Ghost,
    for using a form, seems quite a challenge.
    when you select the selection box, or check boxes in the form, you may need to grab the all the selection, and refresh the page with the pre-selected information, so it will be loaded when the page is refreshed.
    if you are using infopath template, it may be difficult, since we need 2 infopath form templates associate with list A and B individually, not sure how to interact this cross 2 infopath form template.
    my infopath colleague suggest you to try to use one infopath form template with 2 data connections.
    i was thinking,
    if you could populate the items, for example by using getlistitem()
    http://spservices.codeplex.com/wikipage?title=GetListItems
    then you may put the result in an array, and ready to compare.
    since you would like to use a form, then it may not updated directly, i am not quite sure for this, because as i know you may need to use a button to send out and update/refresh the fields.
    http://www.quirksmode.org/js/forms.html
    http://www.javaworld.com/article/2077176/scripting-jvm-languages/using-javascript-and-forms.html
    or you may have to try to use the data view webpart:
    http://www.dotnetcurry.com/showarticle.aspx?ID=581
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Display in multiple selection box

    Hi
    I have two multiple selection boxes.When i select few items in the first box and click a button it should appear on the second box.
    how can it be achieved? any help would be appreciated.

    You could do this or using Javascript or updating the page by passing a parameter.
    It depends on what u have to implement.
    Ing. Steva

  • Hide/Show Pages Based On Dropdown Selection

    Hello,
    This one is driving me crazy. In this form (attached) I have 3 checkboxes and based on what is checked, I want to hide the first page and navigate to the 1st checked box. It works for the Web Chat option, but all others do not. Also, on the next button from the Web Chat page, when I click next, I have an alert pop that should only show if Web Chat is the only selection chosen, but it shows no matter how many selections are made from the checkboxes.
    As always, any help is appreciated!

    Hello,
    That took care of the popup issue, but the navigation is still a problem. For some reason choosing any option from the checkboxes and any option from the Type of setup dropdown always brings me to either a blank page or the Web Chat page.
    Thanks for looking into this, hopefully you (or another member) can assist with this issue as well.

  • Report to show data based on the Selection

    I have a prompt which is having three filters i.e. Region Country and City.
    I have to create a report which shuold show the revenue share based on the selection of the Prompt.
    Say When the Region is selected as Eurpoe then report should be:
    Europe : 12%
    Say When the Counrty is selected as UK then report should be:
    UK: 6%
    Say When the City iis selected as London then report should be:
    London : 1.2%
    How can we get this implemented?

    You want a level based measure in the BMM which will allow you to derive the region share regardless of filtering.
    Then simply use Region is prompted in the report to filter for only the region you want.
    For level based measure, duplicate your measure and drag it to the total level of your Region hierarchy. Define you % measure in the BMM as a logical calc.
    Hope this helps,
    Regards
    Alastair

  • PARM error (shows as mrap) with multiple selections, no error with single selection

    Hello all,
    I am new to Illustrator scripting this is my first script. I am getting a this error " Error 1200: an Illustrator error occurred: 1346458189 ('MRAP'): line 50" which is the line:
    var next_board = doc.artboards.add([next_board_L, next_board_T, next_board_R, next_board_B]); 
    It only occurs when I have multiple selections and never when I have only one selection. After a little research I have found the error is actually PARM, but I don't see any uninstantiated variables or other  issues that could be throwing this error. I am on a mac Illustrator CC. I would appreciate any help on the matter. Below is the full script.
    #target Illustrator
    // This script was made to take all selected objects
    // Create a new arboard for all Selected objects
    // At a user specified width and height then
    // Scale the object to the artboard size and center
    var doc = app.activeDocument;
    var select = doc.selection;
    if (select.length &gt; 0) {
         var title = "Fit Selected Object(s) to Artboard(s)";
         var msg = "Enter the width and height of artboards (single number)";
         var board = Number(Window.prompt (msg, 0, title));
         for(var i = 0; i &lt; select.length; i++) {
              var selectW = select[i].width;
              var selectH = select[i].height;
              if(selectH &gt;= selectW) {
                   if(board &gt; selectH) {
                        scale = board/selectH*100;
              } else {
                   scale = board/selectW*100;
              var boardIdx = doc.artboards.getActiveArtboardIndex();
              var boardSrc = doc.artboards[boardIdx];
              var boardSrc_L = boardSrc.artboardRect[0];
              var boardSrc_T = boardSrc.artboardRect[1];
              var boardSrc_R = board;
              var boardSrc_B = -board;
              var moveX = 10;
              var next_board_L = boardSrc_R + moveX; 
              var next_board_T = boardSrc_T; 
              var next_board_R = next_board_L + (boardSrc_R - boardSrc_L); 
              var next_board_B = boardSrc_B;
              var next_board = doc.artboards.add([next_board_L, next_board_T, next_board_R, next_board_B]); 
              select[i].resize(
                  scale, //this is a percentage of current width 
                  scale, //this is a percentage of current height 
                  true, // changePositions 
                  true, // changeFillPatterns 
                  true, // changeFillGradients 
                  true, // changeStrokePattern 
              var selPosX = select[i].left;
              var selPosY = select[i].top;
              var selBoardDiffX = next_board_L - selPosX;
              var selBoardDiffY = next_board_T - selPosY;
              var toCenter = 0;
             select[i].translate (
                       selBoardDiffX,
                       selBoardDiffY,
                       true,
                       true,
                       true,
                       true
             var boardH = next_board.artboardRect[2] - next_board.artboardRect[0];
              var boardW = next_board.artboardRect[3] - next_board.artboardRect[1];
             if( boardH &gt; select[i].height ) {
                  toCenter = (boardH-select[i].height)/2;
                      select[i].translate (
                                0,
                                -toCenter,
                                true,
                                true,
                                true,
                                true
             var NegSelectW = select[i].width * -1; //Must be a negative number
             if ( boardW &lt; NegSelectW ) {
                  toCenter = (boardW+select[i].width)/2;
                      select[i].translate (
                                -toCenter,
                                0,
                                true,
                                true,
                                true,
                                true

    Ah I finally understand. I looked into that post a little more an started experimenting. I used the function posted to create my artboards. Its a lot easier if you can think
    (x, y, width, height). So yes the issue was with my variable but not in the way I was thinking.
    for those who need it here is the function posted in that thread
    var newRect = function(x, y, width, height) { 
        var l = 0; 
        var t = 1; 
        var r = 2; 
        var b = 3; 
        var rect = []; 
        rect[l] = x; 
        rect[t] = -y; 
        rect[r] = width + x; 
        rect[b] = -(height - rect[t]); 
        return rect; 

  • Multiple selection box + Substracting cascading dropdown list

    I have a multi-select boxe and a drop down but instead of ADDING the choices made in the multi select box to the list of selectable items in the drop down list, I want to SUBSTRACT them.
    I'll try to clearify it: if in the multi-slection box you have:
    Option A and option B and
    in the drop down list, you (depending on you selection) have 2 4 6 8 (options for A) or 4 8 10 12 (options for B).
    When selecting BOTH A and B, the drop down liast should ONLY display the values that overlap/exist in both A and B (e.g 4 8).
    This would have to work for X number of options in both the multi select box and the drop down list.
    Doess anybody know how to make that work?
    Thanks in advanced and kind regards!

    Hi Little_Ghost,
    for using a form, seems quite a challenge.
    when you select the selection box, or check boxes in the form, you may need to grab the all the selection, and refresh the page with the pre-selected information, so it will be loaded when the page is refreshed.
    if you are using infopath template, it may be difficult, since we need 2 infopath form templates associate with list A and B individually, not sure how to interact this cross 2 infopath form template.
    my infopath colleague suggest you to try to use one infopath form template with 2 data connections.
    i was thinking,
    if you could populate the items, for example by using getlistitem()
    http://spservices.codeplex.com/wikipage?title=GetListItems
    then you may put the result in an array, and ready to compare.
    since you would like to use a form, then it may not updated directly, i am not quite sure for this, because as i know you may need to use a button to send out and update/refresh the fields.
    http://www.quirksmode.org/js/forms.html
    http://www.javaworld.com/article/2077176/scripting-jvm-languages/using-javascript-and-forms.html
    or you may have to try to use the data view webpart:
    http://www.dotnetcurry.com/showarticle.aspx?ID=581
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Displaying region based on multiple selection list

    Hi,
    this is my scenario.
    i had 3 drop down selection lists A, B, C. based on A and/or B, C is populated. and when i select one from C, i display a report regions.
    i am able to achieve this, and when in the selection list C, I have a null value as "- All -"
    so when i select "- All -" then the report region should not show anything.
    so in my report region query this is what i gave
    DECLARE
    q varchar2(2000); --query
    w varchar2(2000); --where clause
    we varchar2(1) := 'N'; --where condition
    BEGIN
    q := 'SELECT * from SCCATCH';
    IF :P1_STATION != 'NULL' THEN
    w := 'COLLECTION = :P1_STATION';
    we := 'Y';
    END IF;
    IF we = 'Y' THEN
    q := q ||' WHERE '|| w ;
    END IF;
    RETURN q;
    END;
    where :P1_STATION is the item value of C.
    now what is not working is when i select A, B then C is populated and whne i select C, the report region is displayed.
    now when i go back and select A, B , then C is again populated with a different C list, but the report region still remains the same showing the previous result.
    what i really want to do is. when i select list A,B and then C, report get displayed. and when i go back and change sleection in A,B and then obviously C gets changed, then the report region should not show anything untill i select one from C.
    i understand that there is some basic things i need to do to fix this, but i am not able to fix this.
    Can you help me please.
    Thanks,
    Philip.

    user12943263 wrote:
    HiPlease update your forum profile with a real handle instead of "user12943263".
    I basically want to use the select below for my list but I do not know how to get the app and session no.
    select list_desc, 'f?p='||get_app_id|| ':' || page_no||':' || get_session_id
    from table_nameIn SQL use bind variable notation as described in the Understanding Substitution Strings section of the documentation:
    select
      ,  'f?p=' || :app_id || ':' || page_no || ':' || :app_session
    from
        ... Always consult the documentation before posting here.
    Dynamic Actions, JavaScript, and all "P.Ranish" posts above are all irrelevant to your question.

  • Multiple Selection Boxes for Data

    Hello all,
    I need to create a dashboard that will allow me to drill down by two parameters.  For example:
    I need to see the country in this example USA and then a second critera would be the states.
    So I would want to be able to select USA in one combo box potenially and see the totals and then select a specific state in a second combo box and see those totals.
    I would then want to do south america and those countries.  So South America and then Brazil, mexico, ect.
    Any feedback or ideas.

    HI Jeffrey....
    U can try with the filter option for drilling down to your actual content. For clear picture go through the following link.
    http://visualbis.com/blogs/multi-select-combo-box-for-sap-businessobjects-dashboards-xcelsius/
    Regrads,
    P.Gowri

  • Can someone please help? Show/Hide layers

    Hi there,
    I am making a site for a friend and am having some weirdness
    that I can't figure out. I have a series of layers that show/hide
    based on various selections. Nothing complicated by any means. I am
    using the Dreamweaver Show-hide layers functionality. I am sure I
    have used it before in exactly the same way and not had this
    problem.
    So here is what it is. The page loads and most of the layers
    are set to hidden and then they get toggled on/off based on various
    selections. For some reason when the page loads in IE, all of the
    layers are visible. In Firefox they are hidden as intended.
    If someone has come across this before, or could take a
    moment to look at the site, I would be very grateful. I have stared
    at this and tweaked it so much that I am at a loss and I know that
    my friend is really needing her site to just be up and running.
    Also, now that I think of it, (and this is more of a nuisance
    than a problem) I am using the snap layers extension to position my
    layers. When you look at my site you will see that the layers look
    crazy when the page loads and then eventually move into place. Is
    there a way to make it so the layers are just already in place? Or
    even if they could not become visible until after they have
    snapped?
    Thanks in advance. I really do appreciate any help you could
    provide.
    The address for the test server is
    http://www.jcopple.com/rtc/index.html
    Josh

    I agree with the honest answer. This is a very poor way to
    make a page.
    Nevertheless, in DW's design view, use the A/P Element panel,
    and make sure
    that the eyeball icon is CLOSED for each layer that you want
    to be hidden
    when the page loads. Then save and upload the page.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "CaptFlynn" <[email protected]> wrote in
    message
    news:fvdd2f$7t3$[email protected]..
    > Hi there,
    > I appreciate your honest answer (though it wasn't what I
    wanted to hear,
    > LOL)
    > but for the sake of time I would like to find a solution
    to the existing
    > problem and then once I have her at least up and
    running, I can go back
    > and
    > code it correctly.
    > So if you have any suggestions as to why the layers
    wouldn't be hidden,
    > Iwould
    > really like to hear them.
    > Thanks,
    > Josh
    >

  • Show / hide field based on text in another field

    Hi,
    I'm trying to make one of my fields reactive to what is the text generated in another field.
    At the moment I have this under calculate using custom javascript:
    var Mask = this.getField("Course").value;
    if(Mask == 'Swimming') this.getField("Code").display = display.visible;
    else this.getField("Code").display = display.hidden;
    Whereas Course is the field that is changing and Code is the one that will show/hide based on content of Course.
    Any help?

    Hi Everyone,
    After doing trials with simple calculations it still wasn't working and so I've figured out what the problem is - the document was being exported but with the data being pre-populated from an SQL database in which during the export it all happens at once, not a chain effect so when the export happens it was filling "Code" before "Course" had any info in it...
    The fix was basically having to create a different field in the SQL source itself for an independent field on the pdf form.

  • Show/Hide DVT Admin Menu Based on Entitlements

    Hi,
    We're using the DVT framework provided in Weblogic Portal 10.3.2 to create My Page functionality within our portal project. Part of the requirement is to offer limited functionality to non-admin users.
    For example:
    Portal Level Customization Menu
    - Show/Hide based on entitlements (we tried setting an entitlement of the Main page Book, and that worked, however after that we were unable to see the Customize Menu for any child Books/Pages)
    - Limit entries based on entitlements
    Book Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename book based on entitlements
    Page Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename page based on entitlements
    Portlet Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename portlet based on entitlements
    We've been able to eliminate DVT functionality for entire Books and Pages based on entitlements, however we can't find a way to provide limited functionality as described above.
    Any suggestions on how to accomplish this?
    Thank you.

    Sorry about the confusion. What I meant was, I tested with both setting entitlement and DA roles (separately) and found that the usecase you are describing works. BTW, you are right in that only visitor entitlement roles effect dvt functionality. I just wanted to check if setting DA roles wasn't causing some undesirable behavior.
    Back to the issue you are having, I am assuming you are talking about setting a 'view' entitlement for 'role1' on the primary book and logging in as a user that is not in 'role1' but has 'edit' rights on a child page or book of the primary book. In that case you shouldn't be able to see anything since you don't have view rights to the main book. If that is not the case, can you provide details about your setup?
    Here is what I tested and found working. Set an 'edit' entitlement for 'role1' and a 'view' entitlement for 'role2' on the primary book. When logged in as a user from 'role2' I cannot see the 'Customize' gear icon on the primary book but I can see the gears on child books, pages and portlets. I tested the usecase with non-primary books and that works too.
    Thanks

Maybe you are looking for