Page 1 of 1

Picklist for TI Parameter dialog possible

Posted: Mon Jul 26, 2010 4:14 pm
by SBrenner
Hello everybody,

is it possible to use a picklist (or a kind of) for TI parameters?
I have to specify a parameter for dimension and the possible values are cryptic strings. My idea ist to provide a selection box (or something similar) with valid values as parameters for the dimension.

Any idea how to realize it.

Thanks in advance

Steve Brenner

Re: Picklist for TI Parameter dialog possible

Posted: Tue Jul 27, 2010 12:05 am
by Martin Ryan
Not in pure TI. The alternative is to use Action Buttons in Excel and have drop down boxes in cells in Excel.

If you have to use pure TI the closest you can come is checking the parameters in the prolog before proceeding. I tend to write something like this

prolog:

Code: Select all

errMsg='';
if(pParam@<>'Option1' & pParam@<>'Option 2');
  errMsg='pParam (' | pParam | ') is invalid.  Aborting.  Valid options are Option1 and Option2.';
  ProcessBreak;
endif;
Epilog:

Code: Select all

if(errMsg@<>'');
 ItemReject(errMsg);
endif;
As Alan will tell you, this is a bastardisation of ItemReject (strictly speaking it shouldn't really be used in the epilog), but I find it useful. The other problem with this approach is that only admin users are able to open the error log to see what the problem was.

HTH,
Martin