cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Value from a DM SelectInput to a DM Variable

alberto_rojas2
Explorer
0 Kudos

Hi All,

Here is my problem:

I need to pass a value from of dimension "X" (get by SELECTINPUT) throught one script (in a Model A) that calls (with RUNLOGIC_PH) to another script (in a Model B). Model A have that dimension "X" but Model B don't (so i can't use a %X-set% in the script). I've tried to pass this value with a DM Variable, because its posible to use this value in the two scripts, but when trying to assign the variable used in the SELECTINPUT to a Custom Variable i realized that the value is not just the "ID" but is a big string that have a path and the ID is at the end of this string.

-----

Here is my DM Code:

PROMPT(SELECTINPUT, %SELECTION%,,,%GROUP_DIM%,,1)

INFO(%EQU%,=)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION, %SELECTION%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,PRUEBA.LGF)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,VARIABLE%EQU%%SELECTION%)

-----

Here is the value of Selection after run the package:

"SELECTION = /CONSOLIDACION/LEGAL/PRIVATEPUBLICATIONS/AROJASV/TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:GRUPO|GR_TVBC"

where "GR_TVBC" is the ID i need.

Thanks,

Alberto Rojas

View Entire Topic
former_member186338
Active Contributor
0 Kudos

Hi Alberto,

First:

Instead of:

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,VARIABLE%EQU%%SELECTION%)

Use

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,VARIABLE%EQU%%SELECTION%)

Vadim

alberto_rojas2
Explorer
0 Kudos

Hi Vadim,

Only changing the 3rd parameter to MEMBERSELECTION the variable $VARIABLE$ tooks only the "ID" of the dimension.

Thanks you,

Alberto Rojas

former_member186338
Active Contributor
0 Kudos

Yes, to summarize:

MEMBERSELECTION will extract GR_TVBC from:

/CONSOLIDACION/LEGAL/PRIVATEPUBLICATIONS/AROJASV/TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:GRUPO|GR_TVBC

%SELECTION% has to contain members of the single dimension!

$VARIABLE$ will be passed to scripts called by RUNLOGIC_PH

Vadim