We help IT Professionals succeed at work.

how do i search against another table's data?

tabush
tabush asked
on
How do i perform a script to check if a record in table A already exists in table B?

example:
table A contains a list of serial numbers.
table B also contains a list of serial numbers.

i need to run a search on each record in table A to see if it already exists in B.

i would like to do this through a script and a loop - checking each record in A and if it matches anything in B then flag it and go to the next record.

can anyone give me the correct language to use in a FMP script?
both tables are in the same database.
Comment
Watch Question

Commented:
you don't need a loop to do that, waste of time.
link both tables using the serial number then check if the linked table::ID is true fro each record.
you can even have a calculated field, say has_B
has_B = if (tableB::serialnb= tableA:serialnb ; "yes" ; "no" )
example upon request...

Author

Commented:
Thanks!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.