troubleshooting Question

Crystal Reports: Arrays and Filter

Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)Flag for United States of America asked on
Crystal Reports
12 Comments1 Solution13240 ViewsLast Modified:
CR 8.5

i am reading an example of using filter on an array:
filter(["abc abc abc abc abc","hjjh","hj abc hj"],"abc")[1]

what does the [1] mean at the end?

this is what i'm trying to do:
shared stringVar array qm3Array1;
shared stringVar array qm9Array1;
local stringVar qm3t1;
local stringVar qm9t1;
local numberVar qm3sizeArray1:=ubound(qm3Array1);
local numberVar qm9sizeArray1:=ubound(qm9Array1);
local numberVar cnt;
if cnt=0 then cnt:=1;
local stringVar result;

if qm3sizeArray1>1 then

if i remove the [1] from the end of the filter statement, i get an error about needing a subscription on the array.  if i replace [1] with [2] i get the same result as i have for [1].
i am trying to use filter to find/match the string in qm9t1 with an element in the array qm3Array1

so, for example, qm3Array1:

and qm9t1=nail

i want to return 5.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros