I have a database with tables that are linked together via IDs. Simplified example:
CallLogs Table UniqueID, Date, Type, Log, CustomerID Customers Table UniqueID, FirstName, LastName, City, State A CallLogs record will be linked to a Customers record by: [CallLogs]CustomerID = [Customers]UniqueID ---------------- All of that is working. I have been using Selection to JSON to send data from the DB out to a web app. However, the list of CallLogs doesn't have the name of the linked Customer, because Selection to JSON only works with one table. I want to be able to return a joined set of data. With SQL, I can do a JOIN request into an array of objects, and then convert that array to JSON to send out. However, I can't figure out how to get a joined set of data out of 4D. I can't even get multiple fields in ONE table, into an object array. Here is what I have tried: ---------------- ARRAY OBJECT(aoRecords;0) Begin SQL SELECT * FROM CallLogs INTO :aoRecords End SQL ---------------- Is there a way to accomplish this besides querying and then looping through and building the arrays myself? Thanks! -- Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************