3 Replies Latest reply: Mar 16, 2015 3:35 PM by Michael Solomovich RSS

    Trouble with Section Access

    Steve Hutchison

      Trying to get section access to work, started a week or so ago and got stuck, revisiting now.

       

      This is what I've got so far below. When I login as hutchs I get everything which is correct. However I can't login as jason. This had me puzzled, but I'm guessing it cant find the DISTRIBUTOR_TERR (also tried lowercase) so denies all access.

       

      Where am I going wrong?

       

      TIA, Steve

       

       

      Section Access;

      LOAD * INLINE [

          ACCESS, USERID, PASSWORD, OMIT, DISTRIBUTOR_TERR

          ADMIN, hutchs, hutchs, Type, 10

          USER, jason, jason, Type, 55

      ];

      Section Application;

       

       

      LOAD distributor,

      customer,

      product,

      order_no,

      fin_year,

      fin_period,

      supplier,

      warehouse,

      quantity,

      name,

      invoice,

      val,

      cost,

      lab_hand+'10' as lab_hand,

      mtl_hand,

      long_description,

      ovr_hand,

      list_value,

      analysis_a,

      analysis_b,

      analysis_c,

      cost+lab_hand+mtl_hand+ovr_hand as TFC,

      IF(warehouse='01',IF(analysis_a='EQUIPMENT','Equipment',IF(analysis_a='ACCESSORY','Equipment','Spares')),IF(warehouse='55',IF(analysis_a='EQUIPMENT','Equipment',IF(analysis_a='ACCESSORY','Equipment','Spares')),IF(warehouse='56',IF(analysis_a='EQUIPMENT','Equipment',IF(analysis_a='ACCESSORY','Equipment','Spares')),'Service'))) as Type;

      ODBC CONNECT TO [Sage CD Live];

      SQL SELECT *

      FROM cdlive.dbo.op_inv_tfc

      where product not like 'CAR%' and fin_year >= '13' and fin_year <= '98';

      //where month(date_entered) = '03'

      //and year(date_entered) = year(today);

       

       

      Concatenate(op_inv_tfc)

      LOAD distributor,

      fin_year,

      type as Type,

      budget,

      (budget/('31/08/15'-'01/09/14'))*(today()-'01/09/14') as pro_rata_budget;

      ODBC CONNECT TO [Sage CD Live];

      SQL SELECT *

      FROM cdlive.dbo.hpc_dist_budget;

       

       

      //Dates for Start and End of Financial Year need to be changed every year

       

       

      join(op_inv_tfc)

       

       

       

       

      LOAD Distributor as distributor,

      Distributor_terr;

      SQL SELECT *

      FROM cdlive.dbo.hpc_dist;

        • Re: Trouble with Section Access
          Peter Turner

          Hello Steve,

           

          Section access can be tricky sometimes.

          I don't know your data but from my initial look it might be that your data reduction is looking for a field called 'Distributor_terr' but that is the name of your table loading from SQL.

          You could try changing the Section Access from 'Distributor_terr' to 'distributor', and make sure that there is a value of 55 to allow jason to open the document.

           

          Also check your UI settings such as 'Initial Data Reduction Based on Section Access' and 'Strict Exclusion' are enabled

          • Re: Trouble with Section Access
            Bill Britt

            Hi Steve,

             

            You need to have something that links the two together.

             

             

             

             

            Section Access;
            LOAD * INLINE [
            ACCESS, USERID, PASSWORD, OMIT
            ADMIN, ADMIN, ADMIN,
            USER, USER1, U1, SALES
            USER, USER2, U2, WAREHOUSE
            USER, USER3, U3, EMPLOYEES
            USER, USER4, U4, SALES
            USER, USER4, U4, WAREHOUSE
            USER, USER5, U5, *
            ];
            Section Application;
            LOAD * INLINE [
            SALES, WAREHOUSE, EMPLOYEES, ORDERS
            1, 2, 3, 4
            ];

             

             

             


            In this example, the field OMIT has been added as part of Section Access.
            USER1 will not be able to see the field SALES, USER2 will not be able to see field
            WAREHOUSE and USER3 will not see field EMPLOYEES.
            USER4 has been added twice to the solution since we want to OMIT two fields for this
            user, SALES and WAREHOUSE.
            USER5 has a “*” added which means that all listed fields in OMIT will be unavailable.
            USER5 will not be able to see fields SALES, WAREHOUSE and EMPLOYEES.

             

             

             

             

             

             

             

            • Re: Trouble with Section Access
              Michael Solomovich

              You got the problem right.  You need this field in the section application.  It is essential to have field name in uppercase, and field values too:

               

              join(op_inv_tfc)

              LOAD Distributor as distributor,

              upper(Distributor_terr) as DISTRIBUTOR_TERR

              ;

              SQL SELECT *

              FROM cdlive.dbo.hpc_dist;