Value separation from an array
Hi All,
I am getting multiple values in single parameter(type : string). i had added as string parameter and converted into
number as well. But i dont know how to separate those values into single array each.
i ll mention below which formula i have used:
Stringvar Array string := Split({?ops1_id}, ",");
Numbervar Array number;
Redim number[Ubound(string)];
Numbervar i;
for i := 1 to Ubound(string) do (
number[i] := ToNumber(string[i])
);
number[i];
But this formula used to get count of an array. So please help me out.
Thanks in advance
vinoth
Re: Value separation from an array
I would use next code...
The multiple value parameter ?ops1_id is already an array
In the formula a numeric array 'number' is created with the elements of input parameter
After the formula is executed (when you insert it in a report section) the numeric array is created and loaded
then you can use each array element: number[1] or number[2] or number[3], etc.
Code:
Numbervar Array number;
Redim number[Ubound({?ops1_id})];
Numbervar i;
for i := 1 to Ubound({?ops1_id})
do
(
number[i] := ToNumber({?ops1_id}[i])
);