Passing set values in procedure arguement

  • 26 February 2024
  • 3 replies

Badge +3

    LP_Set_IsDeveolperDetails_Required : 1 , 
    Sp_thisappallowed_for_nonemployee : "Yes" , 
    LS_ADGroup_Usageallowed           : {'E.G','C.G'}, 
    LS_ADGroup_Trainingallowed        : {'E','T.G'} );


PR_UserManagement_Intilization is procedure taking 4 arguments and last 2 is sets.  I am trying to pass sets as shown above and shown below

    LP_Set_IsDeveolperDetails_Required : 1 , 
    Sp_thisappallowed_for_nonemployee : "Yes" , 
    LS_ADGroup_Usageallowed           : data{'P.G','R.p'}, 
    LS_ADGroup_Trainingallowed        : data {'P.G','R.G'} );


Its showing error

  1. error for first one is The 'LS_ADGroup_Usageallowed' argument expects a direct reference to an identifier.
  2. data is not expected

Please help me to resolve this issue



Best answer by gdiepen 26 February 2024, 21:32

View original

3 replies

Userlevel 5
Badge +7

What probably works is creating two sets as local sets within this procedure

sLocalUsageAllowed and sLocalTrainingAllowed


Then before the initialization call, just assign them locally:

sLocalUsageAllowed := {‘P.G’, ‘R.p’} ; 

sLocalTrainingAllowed := {‘P.G’, ‘R.G’} ; 


and then use these two local sets for the arguments.

Badge +3

@gdiepen thanks for reply. i implemented this way before posting & its working. I have been looking for direct assignment in argument. 

Userlevel 5
Badge +7

Not sure if that is possible, because I think aimms would not know the root-set of that argument you provide. Maybe somebody from aimms can share some thoughts on this?


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator