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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array in CR XI

Status
Not open for further replies.

Garyjr123

MIS
Sep 14, 2010
139
US
I am trying to set a parameter to accept multiple values but when I set multiple value to true I receive an array message:

This array must be subscripted. For example: Array [1]

What is this and how do I subscript these values?

Thanks,

Gary
 
I wanted to add that I am trying to have the end user be able to choose from a large list of procedures (150+) to limit what they want to see. Basically, I created a {?proabbr}, imported all the procedure abbrs, and set the accept multiple values to true so they will be able to pull in a few surgical procedures and the data returned will be for just those procedures.

I am also trying to do this for surgical services as well (15+).
 
You need to show us the content of your record selection formula where you are getting this message.

-LB
 
{res2.resunit_id} = {?ResUnitID} and
{appt.start_datetime} in {?StartDate} to {?StopDate} and
{res2.restype_id} = 2 and
{resbooking.start_datetime} in {?StartDate} to {?StopDate} and
{proname.abbr} like [{?ProcAbbr}, "*"]

I'm pretty sure i am way off from making this work.
 
Since you imported the procedure abbreviations, shouldn't they match the field exactly? If they don't match, then are they just the first few letters of the field?

-LB
 
If the entire proname.abbr field is the same as the parameter value, then you just need to change the line to:

{proname.abbr} = {?ProcAbbr}

Otherwise, try the following as your record selection formula:

whilereadingrecords;
numbervar i;
numbervar j := ubound({?ProcAbbr});
stringvar array k;
for i := 1 to j do(
if {proname.abbr} like "*"+{?ProcAbbr}+"*" and
not({proname.abbr} in k) then (
redim preserve k[j];
k := {proname.abbr}
));
{proname.abbr} in k and
{res2.resunit_id} = {?ResUnitID} and
{appt.start_datetime} in {?StartDate} to {?StopDate} and
{res2.restype_id} = 2 and
{resbooking.start_datetime} in {?StartDate} to {?StopDate}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top