On Oct 2, 2018, at 2:00 PM, Chip Scheide wrote:

> given this table configuration
> 
> Animal <------ Animal_Sample_Link -------> Samples
> 
> if there is at least 1 [Sample_Animal_Link] record shouldn't the 
> following code load the animal record(s)?
> 
> QUERY([Sample_Animal_Link];[Sample_Animal_Link]Sample_ID=[Samples]Sample_ID)
> RELATE ONE SELECTION([Sample_Animal_Link];[Animal])
> 
> I ask because it is not, even after a restart of 4D

Four thoughts came to mind:

1. index damage so the query or relation is failing

2. Could there be other relations that 4D could go through to get from 
Sample_Animal_Link to Animal? Maybe 4D picked another set of relations to 
follow to get from here to there. Result is wrong selection of records.

3. Are you running this code from a button or a menu item while a MODIFY 
SELECTION or DISPLAY SELECTION is running? Sometimes 4D will not do certain 
relational things because it can “break” the MODIFY SELECTION or DISPLAY 
SELECTION if any of the tables in question are involved.

4. If you do a  QUERY or QUERY WITH ARRAY instead of a RELATE ONE SELECTION, do 
you get the expected selection of records? If so then see #2 or #3 above. 

Tim

*****************************************
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*****************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to