Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comma separated list for Parameter 1

Status
Not open for further replies.

tsouth4

Programmer
May 2, 2007
46
US
I'm trying to insert a parameter which allows the user to input a list of email addresses for a certain date range and it will return a list of orders for those customers. I've looked at several other similar posts however have been unable to come up with a solution for the problem that I'm having.

I created the followin parameter: {?Email}
which is a string and selected the option to allow multiple values then in the record select expert i inserted the following formula.

{WM_ORDER.DT_PLACED}={?Date Range} and
{WM_ORDER.EMAIL} in split({?Email},",");

I receive an error message that the array must be subscripted. A few things to note:

WM_order.email is a sting [80]

Any help would greatly be appreciated.

 
If the user is entering multiple individual e-mails, then all you need to do is:

{WM_ORDER.DT_PLACED}={?Date Range} and
{WM_ORDER.EMAIL} = {?Email}

-LB
 
if i'm correct

{WM_ORDER.DT_PLACED}={?Date Range} and
{WM_ORDER.EMAIL} =Email};
should work
 
I want the user to be able to enter a list of emails separated by commas.
 
Then change the setup for the parameter so that it does not allow multiple values, and then your formula should work.

-LB
 
That works if you only enter one email address but when you enter multiple it does not work. I want the user to be able to paste something similar to the following in the parameter prompt and it to return any individual orders which a customer placed using any of the email addresses from their list.

test@live.com,jondoe@live.com,test2@aol.com,tom@test.com

When i enter one of the emails your example works perfectly however when i paste the comma separated email addresses it returns no records.

Thanks for your help so far.
 
If they are entering the e-mails as shown and you are NOT allowing multiple values, then your original formula should work:

{WM_ORDER.DT_PLACED}={?Date Range} and
{WM_ORDER.EMAIL} in split({?Email},",")

-LB


 
That was the problem. I was using my original formula which I posted but was allowing multiple values. Formula works great when I don't allow multiple values.

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top