1 Reply Latest reply: Oct 11, 2013 11:52 AM by Jake Turrell RSS

    Using sub variables within a Maxl script

    user10773276

      Does anyone know if you can reference a substitution variable from within a  Maxl script?  I would like to update a security filter based on changing period and year sub variables.  This will allow me to fully automate a filter on top of our planning cube that will prevent users from overwriting actualized months of the forecast if accessing the cube via Essbase connection and adhoc analysis.

       

      This is what I would like to do with the sub vars:

       

       

      login xxx;

      Create or Replace Filter sample.basic.testwrit read on '&FcstYear, Forecast, Working, Jan:&ActMnth', write on '&FcstYear, Forecast, Working, &FcstMnth:Dec'

      Grant filter sample.basic.testwrit to Forecast_User_group;

      logout;

        • 1. Re: Using sub variables within a Maxl script
          Jake Turrell

          Yes, but technically, you aren't using a substitution variable in MaxL.  You're just referencing it in a filter definition.

           

          I was able to get the following to work:

           

          create or replace filter AppName.DBName."Filter_Name" no_access on '@IDESCENDANTS("Entity"), @IDESCENDANTS("Period")',  read on '@IDESCENDANTS("Entity_ABC"), &CurrMonth:"Dec"';

           

          Tested it and it works fine.

           

          Hope this helps,

          - Jake