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:
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;
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,