On Jan 7, 2017, at 4:38 PM, David Adams wrote:

> Thanks Tim. I can't think of anything else either. I was hoping that I'd
> somehow missed a command like Find in object array by attribute." Even if
> it were just a convenience command, it would be nice to have in the
> language. Perhaps there will be some new features here over time. I've
> noticed that the object field query options have continued to evolve.
> (Although objects in a field are likely a very different creature than
> objects in variables/arrays as record data falls within the scope of the
> database engine.)

I didn’t mention the third option which is to create a temporary table with an 
object field and index that. Indexed object fields allow you to query based on 
attributes. It is a special type of index 4D will create for you. So you could 
accomplish an indexed query by using QUERY BY ATTRIBUTE.

http://doc.4d.com/4Dv15R5/4D/15-R5/QUERY-BY-ATTRIBUTE.301-2937165.en.html

So maybe you could have a table that you use to store objects that you need to 
search. Load all the objects into records in the table. Remember that you can 
mix QUERY BY ATTRIBUTES and QUERY commands in a multiline query to get the 
results you need. That allows you to store object from multiple sources in the 
same table and filter them by some criteria. 

I didn’t mention this because once you move from pure memory based objects to 
using the database and records you add network performance issues with 
client/server. But it is another option that might be useful in some 
situations. 

Tim

********************************************
Tim Nevels
Innovative Solutions
785-749-3444
[email protected]
********************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to