The selection of One records is not changed based on the Many records, the selection is lost.
Further in the documentation it states: > Some of the commands listed in the previous table (such as the query > commands) load a current record after the task is completed. In this case, > the record that is loaded does not automatically select the records related > to it. Again, if you need to access the related data, you must explicitly > select the related records by using RELATE ONE or RELATE MANY. So, the Query commands should never automatically selected related records. However, they can use data from related tables when automatic relations is on. I think this is what is meant by the portion of the documentation you quoted. To be clear, I’m looping through a selection of One records, querying for related Many records and then further narrowing the selection of Many records using Query Selection By Formula: Automatic Many-to-One is turned On Get selection of One records and Loop. For each record: 1. Query for related Many records - this does not affect the selection in the One table (correct according to the above documentation) 2. Query Selection by Formula on Many records - this doesn’t just change the selection in the One table, it removes it. There is no selection anymore. The incorrect behavior in step 2 is not dependent on the query conditions or whether or not any records are found. It happens if you simply do the following: Query Selection by Formula ([Many_Table];True) ------------------------------------------------ Richard Wright DataDomain [email protected] ------------------------------------------------ > Date: Thu, 2 Aug 2018 00:56:13 +0000 > From: Keisuke Miyako <[email protected]> > > according to the documentation: > > http://doc.4d.com/4Dv17/4D/17/About-Relations.300-3730102.en.html > > QUERY BY FORMULA "will use existing automatic Many-to-One relations" and > "will use automatic One-to-Many relations" > > so as soon as a record of the many table becomes current, it automatically > changes the current record on the 1 table. > > isn't that how automatic relations are supposed to work? > > 2018/08/02 7:46、Richard Wright via 4D_Tech > <[email protected]<mailto:[email protected]>>のメール: > I discovered this in v16 R2 but it’s also a problem in v13.5. Has anyone else > seen this problem? ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

