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

BPC 10.0 NW on Oracle - Checking PROMPT variable for BLANK value in logic script

Former Member
0 Likes
236

Dear All,

When PROMPT values are being passed on to logic script(when a DM package is executed), say for CATEGORY DIM, how can I check if the passed value is BLANK or not? i.e.  how can I check if %CATEGORY_SET% is BLANK or not?

If this is possible, how can I check the number values, selected in the PROMPT value?

Thanks,
Peri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Peri,

It depends what you want to do in the script if variable is empty and what when it isn't.

If for example, you want to skip some part of the code when CATEGORY_SET is empty you can put

*FOR %V% = %CATEGORY_SET%

...

*NEXT

around that code and it will be skipped in case of an empty variable. Of course this works only if user can select either nothing or a single member.

Regards,

Gersh

Former Member
0 Likes

Thanks, Gersh.

When user selectes 'All' as input, will the PROMPT variable contain all members with comma separated or is it a 'All' string?

Thank you,

Peri


Former Member
0 Likes

Hi Peri,

If you are calling a Logic Script it will receive a comma separated list. But for BPC selection purposes it knows that all members were selected and doesn't restrict that Dimension.

Regards,

Gersh

Answers (1)

Answers (1)

gajendra_moond
Contributor
0 Likes

Hi Peri

I am not sure if I have understood your question properly but here is what I think. To check if the value is blank, check the length of the member if it is zero.

To check if a member is number or not, divide it by 1 and check if number is returned or NaN (Not a Number).

Former Member
0 Likes


Gajendra,

Thanks for the response.

Do you have logic script code snippet for this? I do not know which logic script statement to achieve the above. For example IF and LENGTH statements and I am not sure how I can call this within logic script.

Any code snippet on this would be greatly appreciated.

Another thing is... I wand to check the #  of values user has specified in the PROMPT variable. For example, if the user has chosen three CATEGORY values in the PROMPT variable, I need to check that as well.

Thank you!

Regards,

Peri