Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
this Code works, but it's not nice - how can i do it better?
// This will be later set by the Publisher
Set Inputparameter = '20090930','20090831','20081231';
//
set i = 0;
For each v IN $(Inputparameter)
if i= 0 then
Set RevaluationDate = $(v);
end if
if i= 1 then
Set PrevMonthDate = $(v);
end if
if i= 2 then
Set EndYearDate = $(v);
end if
Let i = i + 1;
NEXT
Oleg's reponse may be more pertinent to your specific scenario, but as to the general question of parsing an array:
Set Inputparameter = '20090930','20090831','20081231';
LET RevaluationDate = pick(1,$(Inputparameter));
LET PrevMonthDate = pick(2,$(Inputparameter));
LET EndYearDate = pick(3,$(Inputparameter));
You can have multiple input parameters, both from the command line and from Publisher, without the need in parsing a single parameter...
Hi Ole,
thanks fpr your replay! But this doesn't work! Under "Script Parameters" it is written:
A separate document will be created for each value. To use a sequence of data enter the start and stop values separated with a "-". Separate single values or sequences with a ";".If you select a field from the document all values in the field will be used.
But I need all parameters in on Projekt. The code I wrote work fine - but I think, there will be a better practice for that!
regards Volker
Oleg's reponse may be more pertinent to your specific scenario, but as to the general question of parsing an array:
Set Inputparameter = '20090930','20090831','20081231';
LET RevaluationDate = pick(1,$(Inputparameter));
LET PrevMonthDate = pick(2,$(Inputparameter));
LET EndYearDate = pick(3,$(Inputparameter));