Skip to main content
Solved

Passing set values in procedure arguement

  • February 26, 2024
  • 3 replies
  • 42 views

Forum|alt.badge.img+4


dssuc::PR_UserManagement_Intilization(
    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

dssuc::PR_UserManagement_Intilization(
    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

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.

3 replies

gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • 155 replies
  • Answer
  • February 26, 2024

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.


Forum|alt.badge.img+4
  • Author
  • Ace
  • 12 replies
  • February 29, 2024

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


gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • 155 replies
  • February 29, 2024

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