AnsweredAssumed Answered

Many to one relationship issue

Question asked by mz5005 on May 17, 2017
Latest reply on May 20, 2017 by mz5005

I need to compare a table with about 15K (not unique) Companies to a table of (a hundred) unique LargeCompanies. (not unique = one company can be listed several times). The purpose is to flag what Companies are a Large Company. The 2 tables are linked together on the CompanyName/LargeCompanyName fields. This is of course a many to one relationship (if any relationship at all).


My script works well in the sense that it does what it should do, but ONLY for the first occurrence of a company in the Companies table. The other times the same company appears in the Company table, the flag is not set.


In the script I have set the Sort order to another field than CompanyName to make sure the records-order is not by CompanyName. That doesn't help.


Q: do I misunderstand something about (1 to Many) relationships here, or is it really a problem in my script?


Script attached - flag is "Active=No" - field names vary slightly from above (changed for sake of clear explanation)


Staring on this for hours already - any advice greatly appreciated!