on 2015 Aug 05 7:38 PM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
| User | Count |
|---|---|
| 41 | |
| 4 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.