cancel
Showing results for 
Search instead for 
Did you mean: 

Modify package: Prompt Text and Pass to Scripts

0 Kudos

Hi Experts,

I'm trying to setup a package list to allow users enter a value (A,B,C) of a Dimension [COSTCENTER] Property [BU] and then pass this value to the script as scoping/filter, but have some issues.  We are using NW10, SP15.

The Prompt setting is: PROMPT(TEXT, %BU%, "Select Business Unit to run",,,,,")

I have two script scoping and both of them have some issues:

Scoping 1 uses Select function; This one works, but it works on ALL COSTCENTER, i.e. if I enter "A", the calculation is performed for ALL COSTCENTER member

*SELECT(%BU_SEL%,"ID","COSTCENTER",BUSINESS_UNIT=%BU%)

*XDIM_MEMBERSET COSTCENTER=%BU_SEL%

Scoping 2 doesn't pass the script validation. The error is "No member found in Dimension "COSTCENTER" for condition "CALC"="N".  But there are base members with the property properly tagged.

*XDIM_FILTER COSTCENTER = [COSTCENTER].properties("BU")="%BU%"

Any suggestion? Thanks in advance.

Ben

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Ben,

A lot of syntax errors...

Can you provide full DM advanced script?

And looks like the line have to be corrected:

*SELECT(%BU_SEL%,"[ID]",COSTCENTER,"[BUSINESS_UNIT]=$BU$")

Assuming that:

1. You pass BU from prompt %BU% using REPLACEPARAM TASK

2. BUSINESS_UNIT - is the property name for COSTCENTER dimension

Vadim

former_member186338
Active Contributor
0 Kudos

P.S. Instead of PROMPT(TEXT... you can use PROMPT(COMBOBOX... if you have limited number of Business Units that can be provided as a list for COMBOBOX.

B.R. Vadim

0 Kudos

Thanks Vadim, you are always quick and to the point:)

It's likely that I didn't setup the REPLACEPARAM TASK.  What would be the syntax to setup for my case?

Once I figure out how to use TEXT prompt I will try use the COMBOBOX, as that's exactly what I like to provide to the user.

cheers.

Ben

0 Kudos

Here is the DM advaced script;

 

PROMPT

(SELECTINPUT,,,,"%CATEGORY_DIM%,%TIME_DIM%")

 

PROMPT

(TEXT, %BU%, "Select Business Unit to run earning calculation",,,,,")

 

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,WIP_CM_DEFAULT_BU.LGF)

former_member186338
Active Contributor
0 Kudos

Hi Ben,

This script:

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

PROMPT(TEXT, %BU%, "Select Business Unit to run earning calculation",,,,,")

INFO(%EQU%,=)

INFO(%TAB%,;)

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

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

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,WIP_CM_DEFAULT_BU.LGF)

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

Will pass to the script logic variable $BU$ that will be used in *SELECT(...

Vadim

former_member186338
Active Contributor
0 Kudos

P.S. COMBOBOX instead of TEXT will be:

PROMPT(COMBOBOX,%BU%,"Select Business Unit to run earning calculation",0,,{BU1,BU2,BU3})


Where BU1,BU2,BU3 - fixed list of business units user will select....


The rest is the same!


Vadim

0 Kudos

Works like a charm!  I had to play around with the syntax on the ComboBox setting, but it works great now...

Thanks Vadim!

cheers,

Ben

former_member186338
Active Contributor
0 Kudos

You can't do a lot with a syntax of COMBOBOX, just a list of fixed text values separated by commas in curly brackets. Nothing else

Vadim

0 Kudos

Hi Vadim,

I've noticed that there is a Blank at the end of the dropdown list, but I didn't put a blank in the Prompt setting.  If I select the blank, then an error occurs.  Is this normal or something I didn't do right?

Is there an option to allow the user run multiple selection, i.e. A003 AND A004 in one pass?

cheers,

ben

 

PROMPT

(COMBOBOX,%BU%,"Select BU to run earning calculations",,,{A003,A004,A005,A006,A019},)

former_member186338
Active Contributor
0 Kudos

Hi Ben,

Do you see the difference between 2 lines:

PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",,,{A003,A004,A005,A006,A019},)

PROMPT(COMBOBOX,%BU%,"Select Business Unit to run earning calculation",0,,{BU1,BU2,BU3})

Your line has to be corrected to:

PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,,{A003,A004,A005,A006,A019})

"0" - means: limit values to the list (no empty line). And remove comma at the end. You may also play with parameter after 0 - default value.

"Is there an option to allow the user run multiple selection, i.e. A003 AND A004 in one pass?" - yes, but the user will have to manually type multiple values separated by comma in the combobox field.

*SELECT(%BU_SEL%,"[ID]",COSTCENTER,"[BUSINESS_UNIT]=$BU$") - will also work.

Vadim

0 Kudos

Hi Vadim,

I changed the Prompt line as you suggested and it works!  In order to allow the user to enter multiple values in the combobox, it seems that I had to remove the 0 from the line.  But I think this was good enough for my purpose.  Thanks again for your help!

Cheers,

Ben

former_member186338
Active Contributor
0 Kudos

Hi Ben,

Yesterday I hasn't tested the COMBOBOX on the real system, but today I managed to do it and found some differences between BPC 10 and 7.5:

For BPC 10:

1. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,,{A003,A004,A005,A006,A019})

Will provide a fixed list with Empty line at the end of list and with empty default selection. But you are forced to select some non-empty line ("Next" for empty value generates error). You are not able to enter list of values (not able to type in combobox field).

2. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,A003,{A003,A004,A005,A006,A019})

Will provide a fixed list without Empty line at the end of list and with A003 as a default selection. "Next" will be OK. You are not able to enter list of values (not able to type in combobox field).

3. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",1,,{A003,A004,A005,A006,A019})

Will provide a list with Empty line at the end of list and with empty default selection. But you are forced to select some non-empty line ("Next" for empty value generates error) or you can type some value - from the list or not from the list. You are able to enter list of values (it's allowed to type in combobox field).

4. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",1,A003,{A003,A004,A005,A006,A019})

Will provide a list without Empty line at the end of list and with A003 as a default selection. You are not able to clear default value and proceed ("Next" for empty value generates error) but you can type some value - from the list or not from the list. You are able to enter list of values (it's allowed to type in combobox field).

For BPC 7.5:

1. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,,{A003,A004,A005,A006,A019})

Will provide a list without Empty line at the end of list and with empty default selection. You are not forced to select some non-empty line ("Next" for empty value will pass without error) or you can type some value - from the list or not from the list. You are able to enter list of values (it's allowed to type in combobox field). Like option 3 for BPC 10.

2. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,A003,{A003,A004,A005,A006,A019})

Will provide a list without Empty line at the end of list and with A003 as a default selection. You are able to clear default value and proceed ("Next" for empty value will pass without error) or you can type some value - from the list or not from the list. You are able to enter list of values (it's allowed to type in combobox field). Like option 4 for BPC 10.

3. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",1,,{A003,A004,A005,A006,A019})

Will provide a fixed list without Empty line at the end of list and with empty default selection. But you are forced to select some value from the list ("Next" for empty value generates error) and if you type value missing in the list you will also have error. You are able to enter list of values but only from combobox lines (it's allowed to type in combobox field).

4. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",1,A003,{A003,A004,A005,A006,A019})

Will provide a fixed list without Empty line at the end of list and with A003 as a default selection. You are not able to clear default value and proceed ("Next" for empty value generates error) and if you type value missing in the list you will also have error. You are able to enter list of values but only from combobox lines (it's allowed to type in combobox field).

See the difference!

Vadim

0 Kudos

That's very helpful, Vadim.   Your case number 4 for BPC10 works perfect for me.

Cheers,

Ben

former_member186338
Active Contributor
0 Kudos

I even created the blog post with the results of this investigation...

Vadim

0 Kudos

I liked it ...

Answers (0)