2 Replies Latest reply: Oct 13, 2015 6:11 AM by Peter Cammaert RSS

    REDUCTION - using two values from field

    Rick Worthy

      Which is the proper way to write the section access to allow a user to view two values from one particular field using REDUCTION in section access?

       

      Section Access;

      LOAD * INLINE [

          ACCESS, NTNAME, DEPT, DEPT, DEPT

          ADMIN, DOMAIN\ADMIN, *

          USER, DOMAIN\USER1, DEPT1, DEPT2, DEPT3

          USER, DOMAIN\USER2,  DEPT2, DEPT3

          USER, DOMAIN\USER3, DEPT3

           

      ];

      Section Application;

       

      or should it be:

       

      Section Access;

      LOAD * INLINE [

          ACCESS, NTNAME, DEPT

          ADMIN, DOMAIN\ADMIN, *

          USER, DOMAIN\USER1, DEPT1

          USER, DOMAIN\USER1, DEPT2

          USER, DOMAIN\USER1, DEPT3

          USER, DOMAIN\USER2, DEPT2

          USER, DOMAIN\USER2, DEPT3

          USER, DOMAIN\USER3, DEPT3

           

      ];

      Section Application;

       

      Any help would be greatly appreciated!  Cheers

        • Re: REDUCTION - using two values from field
          Vincent Ardiet

          Hi Rick,

          The second one is the proper solution. The first one is not feasible because you are trying to create in the same table many fields with the same name.

          In fact, your section access is a table like every others but just hidden in your datamodel.

          Regards,

          Vincent


          • Re: REDUCTION - using two values from field
            Peter Cammaert

            An even better solution may be something like this:

             

            Section Access;

            LOAD * INLINE [

                ACCESS, NTNAME, LINK

                ADMIN, DOMAIN\ADMIN, *

                USER, DOMAIN\USER1, USR1

                USER, DOMAIN\USER2, USR2

                USER, DOMAIN\USER3, USR3

            ];


            Section Application;


            DataPermissionsTable:

            LOAD * INLINE [

            LINK, Department

            USR1, Dept_One

            USR1, Dept_Two

            USR1, Dept_Three

            USR2, Dept_Two

            USR2, Dept_Three

            USR3, Dept_Three

            ];

            :

             

            This code allows you to put your section access code in a hidden script, while the actual data permissions table can be edited in your regular script (or read from an Excel).

             

            Best,

             

            Peter