cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CHECKBOXGROUP Prompt() Command

Former Member
0 Likes
432

Hi there,

I'm getting a bit frustrated with the above Data Manager function - on paper, it gives me exactly what I need but I just cannot make it work!

Has anybody else had luck with this?

We have a script that runs for only 4 entities, and the script pushes data entered by these 4 entities into our main Trial Balance. Depending on timing, availability of data, etc. we would like to push any of the 4 at once, or all of them, or any combination of them (note that the person entering data, and the person pushing it to the TB are not necessarily the same). So this function (if it works!) is perfect. On paper.

This is what I have in my modify script:

PROMPT(CHECKBOXGROUP,%ENTS%,"Please select the entity or entities",{0,0,0,0},{2170,5300,5340},{"2170","5300","5340"})

(Note: the screenshot was when we only had 3 entities, but the idea is the same)

According to the functions listed in the package (when you select the CHECKBOXGROUP from under the Functions list), the expected syntax is this:

PROMPT(CHECKBOXGROUP,[variable], [label], [default value], [label List], [value List])

HOWEVER this differs from what is in the EPM for Office documentation:

PROMPT (CHECKBOX, [variable],[label],[default values],[label for check items]

I've tried every variation of single quotes, double quotes - and none - and I've also tried omitting the various arguments completely.

When I run the package, I get an error:


[Message]

--------------------------------------------------------------

RUN_LOGIC:Member "1" not exist

model: CONSOLIDATION. Package status: ERROR

And the selection gets passed as follows:

ENTS = Yes

0,0

SELECTION = /APPSET/CONSOLIDATION/PRIVATEPUBLICATIONS/USER/TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:CURRENCY|LC|DIMENSION:TIME|2016.001

...so it looks like it's ignoring my entity selection completely.

Am I missing something? Has anyone managed to get this working in the real world?

Or is there another way to skin this cat?

Thanks very much,

Jason

PS. We are using EPM for Office SP25 Patch 1 (.NET4 version).

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

Please show you full Advanced DM script, not only:

PROMPT(CHECKBOXGROUP,%ENTS%,"Please select the entity or entities",{0,0,0,0},{2170,5300,5340},{"2170","5300","5340"})

Vadim

Former Member
0 Likes

Hi Vadim,

I hope you're well.

I haven't really done much with the rest of the script yet, but here's the full thing:

'Prompt for entity or entities

PROMPT(CHECKBOXGROUP,%ENTS%,"Please select the entity or entities",{0,0,0},{"2170","5300","5340"},{"2170","5300","5340"},)

"Prompt for other info (currency and time)

PROMPT(SELECTINPUT,,,,"%TIME_DIM%,%CURRENCY_DIM%")

INFO(%EQU%,=)

INFO(%TAB%,;)

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

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%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,REPLACEPARAM,ENTS%EQU%%ENTS%)

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

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

The TBUPDATE_INPUT logic then contains an *XDIM_MEMBERSET ENTITY = $ENTS$, but it's not getting anywhere close to that bit yet!

Hope that clarifies.

Thanks,

Jason

PS. Don't you ever sleep??

former_member186338
Active Contributor
0 Likes

Looks like CHECKBOXGROUP works only with binary values: 0 or 1, not useful for members...

You can use some not elegant workaround with RADIOBUTTON:

PROMPT(RADIOBUTTON,%ENT1%,"Ent1",BEXXX,{"BE1000","Nothing"},{"BE1000","BEXXX"})

PROMPT(RADIOBUTTON,%ENT2%,"Ent2",BEXXX,{"BE3000","Nothing"},{"BE3000","BEXXX"})

Where BE1000 and BE3000 are real members and BEXXX - missing member.

Then we combine result in ENTS:

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,ENTS%EQU%%ENT1%,%ENT2%)

$ENTS$ will contain something like: BE1000,BEXXX or BE1000,BE3000 or BEXXX,BEXXX

Then in script code:

*SELECT(%B%,[ID],BE,ID=$ENTS$)

*XDIM_MEMBERSET BE=%B% //only valid members will be scoped!

Vadim

P.S. Unfortunately Prompts will be on different pages...

former_member186338
Active Contributor
0 Likes

In addition a few words about CHECKBOXGROUP:

Variable $ENTS$ will receive the following strings:

0,0,0,0

1,0,0,0

0,1,0,0

1,1,0,0

Etc...

You can use *FOR %E%=$ENTS$ AND %ENT%=2170,5300,5340 to loop this values but you can't skip some code based on condition.

You can try to use conditional REC but it will be executed anyway...

Former Member
0 Likes

Thanks Vadim, I'll give the radio button idea a try instead - maybe it's not quite as ugly as we think...

Thanks for the feedback, as always very useful.

All the best

Jason

former_member186338
Active Contributor
0 Likes

At least it will work