ArrayFind

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
AndrewT
Junior Coder
Posts: 38
Joined: Thu Sep 17, 2015 6:06 pm

ArrayFind

Post by AndrewT » Thu Nov 30, 2017 7:06 pm

I am trying out the new ArrayFind function but not having any luck. I am trying to use it on the results of a DBQuery and the only result I get is an index of -1.

Can the ArrayFind function only be used on single dimension arrays? Any other tricks to this new function?

Thanks,
AndrewT

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: ArrayFind

Post by Marcus Tettmar » Sun Dec 03, 2017 2:28 pm

ArrayFind works on single dimensional arrays only. DBQuery returns a muilti-dimensional array. You shouldn't need to array sort if you are using DBQuery - just set your sort order in the query (e.g. using the ORDER BY statement).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts