1 Reply Latest reply on Oct 11, 2013 4:52 PM by Jake Turrell

    Using sub variables within a Maxl script


      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;


        • 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