13 Replies Latest reply: Sep 23, 2010 11:09 AM by Miguel Angel Baeyens de Arce RSS

    Section Access- Different Field restriction for Filter

    grinja

      Hi all, How would one go about setting up section access based on more than one Dimension/Field?

      I have the setup below but need to add an additional restriction (lets Call it OFFICE with Office_X and Office_Y).When I add an Office field to the Application below I get an error load about a circular loop in my model.

      Any idea on what the syntax should look like in order to restrict data on an 'Office field' as well?

       


      //Need to create a User that has access based on OFFICE?:
      //Per Company
      section Access;
      LOAD * INLINE
      [
      ACCESS, USERID, PASSWORD, COMPANY
      ADMIN, ADMIN, ADMIN
      USER, PowerUser, letmein, *
      USER, CompanyUser_X, letmein, X
      USER, CompanyUser_Y_, letmein, Y

      ];

      Section Application;
      load * inline
      [
      COMPANY, Company
      X, Company_X
      Y, Company_Y

      ];


        • Section Access- Different Field restriction for Filter

          Hi I thinkk the code you mentionned here is owrking.

          But you should add a label for your inline table. If you don't a new name will be created at each reload of the application.

          I would also avoid to have two fields names company (it is working because of the case but I would avoid it).

          If you have a loop in your application, I doubt that it is because of this part of script...

          Rgds,

          Sébastien

           

          • Section Access- Different Field restriction for Filter
            Manish Kumar

            Hi,

            Can you please try the attached example ?

             

            section Access;
            LOAD * INLINE [
            ACCESS, USERID, PASSWORD, COMPANY,OFFICE
            ADMIN, ADMIN, ADMIN, ,
            USER, PowerUser, letmein, , OFFICE_X
            USER, abc, abc, X , OFFICE_X
            USER, xyz, xyz, Y ,OFFICE_Y ];

            Section Application;
            load * inline [COMPANY, Company
            X, Company_X
            Y, Company_Y ];

            Load * inline [OFFICE
            OFFICE_X,
            OFFICE_Y];

             

            - Manish

              • Section Access- Different Field restriction for Filter

                Hi Manish,

                I would rather use this code:

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 





                 

                section Access;

                LOAD * INLINE [ ACCESS, USERID, PASSWORD, COMPANY_OFFICE
                ADMIN, ADMIN, ADMIN
                USER, PowerUser, letmein, *
                USER, Company User_X, letmein, X
                USER, CompanyUser_Y_, letmein, Y ];

                Section Application;

                [Company_office]:
                load * inline [
                COMPANY_OFFICE, COMPANY, OFFICE
                X, COMPANY_X, OFFICE_X
                Y, COMPANY_Y, OFFICE_Y
                Y, COMPANY_Y, OFFICE_Y2

                ];


                This way will help you to define different groups of companies and offices.

                 

                Pls keep me posted.

                Sébastien

                 

                 

                 



                  • Section Access- Different Field restriction for Filter
                    grinja

                    Hi all,

                    Sorry for the late reply this project was put on the back burner for a while ...

                     

                    Thank you all for the suggestions, I ended up using Sebastien's implementation. Although not a requirement now; it will not surprise me that at somepoint I may need to have more than one group/office combo.

                     

                     

                      • AW:Re: Section Access- Different Field restriction for Filter
                        misterminit

                        This looks good if you can define all values in both fields.

                        My idea is to define one value with data, e.g. in the field company and a wildcard in the field office.

                        No such idea what it has to look like.

                        I testes

                        load * inline

                        comany_office, company, office

                        X, company_x, *

                        Y, *, office_x

                        or

                        X, company_x,

                        Y,,office_x

                        but no match. In all cases the user can see....... no values.

                        Any ideas?

                        Regards

                          • AW:Re: Section Access- Different Field restriction for Filter
                            Marco Bombonato

                            Hi Marti,

                            I have the same prolem....have you resolved?

                            Thanks

                              • AW:Re: Section Access- Different Field restriction for Filter
                                Miguel Angel Baeyens de Arce

                                Hello,

                                Using "*" in section access doesn't mean "all values for field" but "all listed values for field within section access". If you want a user to get all information, set nothing instead the asterisk for any admin user, and as many lines as possible values for each user.

                                Hope that helps

                                EDIT: empty values will work for admin access, many lines will be needed for user access in case one user has access to more than one value in the reduction field, since this only allows one value per line.

                                  • AW:Re: Section Access- Different Field restriction for Filter
                                    Marco Bombonato

                                    Hello,

                                    now I have the problem that with this script

                                     

                                    section access;

                                    load * inline [

                                    ACCESS,USERID,PASSWORD,OFFICE,EMPLOY

                                    User,U1,U1,1,AAA

                                    User,U2,U2,2,

                                    User,U3,U3,,BBB];

                                     

                                    section application;

                                    load * inline [

                                    amount,OFFICE,EMPLOY,number_question

                                    10000,1,AAA,10

                                    1200,1,AAA,20

                                    1400,2,BBB,30

                                    1500,2,BBB,40

                                    5600,1,BBB,50

                                    7000,3,AAA,60

                                    8000,3,CCC,70

                                    9000,4,BBB,80];

                                    and the strikly exclusion the user U2 and U3 can not open the document.
                                    Have any suggestion?
                                    Thanks


                                      • AW:Re: Section Access- Different Field restriction for Filter
                                        Miguel Angel Baeyens de Arce

                                        Hi,

                                        I probably misled you with my previous post, the writing was confusing or incomplete.

                                        As only one value per field is allowed in section access, should you want one user to get results from more than one value of that field (OFFICE or EMPLOY) you will need to add as many lines as values you want to get.

                                        On the other hand, I've never used more than one reduction field, and if needed I've created a new table so one value in section access identifies one record in the reduction table. That may be causing some issues in your scenario.

                                        Hope that helps

                                          • AW:Re: Section Access- Different Field restriction for Filter
                                            Marco Bombonato

                                            Hi,

                                            have you one example? with cases where one user can see all data in one field?

                                             

                                            thanks

                                              • AW:Re: Section Access- Different Field restriction for Filter
                                                Miguel Angel Baeyens de Arce

                                                Hi,

                                                This is the basic one, but works:

                                                 

                                                SECTION ACCESS; STAR IS *; Users: // label not needed, just for traceabilityLOAD * INLINE [ACCESS, USERID, PASSWORD, CODE ADMIN, ADMIN, ADMINUSER, USER1, USER1, ESUSER, USER2, USER2, USUSER, USER3, USER3, RUUSER, USER4, USER4, BRUSER, USER4, USER4, DEUSER, USER5, USER5, *]; SECTION APPLICATION; Countries:LOAD * INLINE [CODE, NameES, SpainBR, BrazilUS, United StatesRU, RussiaFR, FranceDE, GermanyUK, United KingdomIE, Ireland];


                                                In this example, ADMIN will be able to see all countries. All users are allowed to see just one country except for USER4, who is allowed to see both BR and DE, and -at the moment- USER5 who is allowed to see all listed values (ES, US, RU, BR, DE) but not all values (not allowed to FR, UK, IE).

                                                Now say you want USER6 to be able to see all countries. Then, the following lines must be added to the section access script:

                                                 

                                                USER, USER6, USER6, FRUSER, USER6, USER6, UKUSER, USER6, USER6, IEUSER, USER6, USER6, *


                                                Now, once that USER6 is added, USER5 will also be allowed to see all countries, because all posible values for "Code" are listed in the section access. Further users with access to all countries will only need one line

                                                 

                                                USER, USER7, USER7, *


                                                Say you want restrict USER5 to see only IE, then you have to change its line to

                                                 

                                                USER, USER5, USER5, IE


                                                Finally, the complete script will look like

                                                 

                                                SECTION ACCESS; STAR IS *; Users: // label not needed, just for traceability LOAD * INLINE [ ACCESS, USERID, PASSWORD, Code ADMIN, ADMIN, ADMIN USER, USER1, USER1, ES USER, USER2, USER2, US USER, USER3, USER3, RU USER, USER4, USER4, BR USER, USER4, USER4, DE USER, USER5, USER5, IEUSER, USER6, USER6, FRUSER, USER6, USER6, UKUSER, USER6, USER6, IEUSER, USER6, USER6, *USER, USER7, USER7, *]; SECTION APPLICATION; Countries: LOAD * INLINE [ Code, Name ES, SpainBR, BrazilUS, United StatesRU, RussiaFR, FranceDE, GermanyUK, United KingdomIE, Ireland];


                                                Hope that helps

                                                  • AW:Re: Section Access- Different Field restriction for Filter
                                                    Marco Bombonato

                                                    Hi Miguel,

                                                    thanks for the example, it works but you must write CODE and not Code Big Smile

                                                    But my problem is not when I have one field to reduce the data, but more fields.

                                                    I try this script for my problem:

                                                     

                                                    SECTION ACCESS;

                                                     

                                                    LOAD * INLINE [

                                                    ACCESS, USERID, PASSWORD, CODE

                                                    ADMIN, ADMIN, ps

                                                    USER, USER0, ps,ES-Madrid

                                                    USER, USER1, ps, ES-Barcellona

                                                    USER, USER2, ps, UK-London

                                                    USER, USER3, ps, ES-all

                                                    USER, USER4, ps, all-all

                                                    ];

                                                     

                                                    SECTION APPLICATION;

                                                     

                                                    STAR IS *;

                                                     

                                                    LOAD * INLINE [

                                                    CODE, Nation, City

                                                    ES-Barcellona, Spain, Barcellona

                                                    ES-Madrid, Spain, Madrid

                                                    UK-London, United Kingdom, London

                                                    ES-all, Spain, *

                                                    all-all, *, *

                                                    ];



                                                     

                                                    Logicaly it must work (in my mind :-))

                                                    can you help me?

                                                     

                                                    Thank you for your patience.