Joined: 24 Jun 2009
Location: United Kingdom
Online Status: Offline
Posts: 9
Topic: Parameters & Arrays Posted: 08 Jul 2013 at 3:49am
I need to use the 'allow multiple values' option for a user to enter up to five alpha-numeric Customer IDs. The parameter works fine with just the discreet option allowed but when 'allow multiple values' is selected the error message of 'this array must be subscripted. For example: Array [1]' appears.
I then see you cannot create an array through a formula so what needs to be done with the Customer ID field to 'allow multiple values' to function?
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 09 Jul 2013 at 4:53am
this is my understanding of allow multiple values...you would have to provide a list of the customerID field for the user to select from. If you have already done that, then the logic to use the values would be something like:
{table.customerID} in {?customerIDParameter}
or
you could iterate through the array like:
local numbervar x;
for x := 1 to UBOUND({?customerIDParameter}) do
(
if {?customerIDParameter}[x] = {table.customerID} then
do something
else
do something else
)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum