• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting a value from one Filemaker DB and see if it exists in another.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting a value from one Filemaker DB and see if it exists in another.


  • Subject: Re: Getting a value from one Filemaker DB and see if it exists in another.
  • From: Gary <email@hidden>
  • Date: Wed, 20 Nov 2002 17:45:21 -0500

On 11/20/02 10:51 AM, Dan Doughtie wrote:
Dan,

First, as you know, your script snippets won't cut it.

Assuming that you are using FM Pro 4 or 5, then the answer to your problem
is already on your hard drive...or nearby.

Look inside the folder (created during install) called: "FileMaker and
AppleEvents".

Inside this folder, there is a folder called "Matching Data".

I opened that sample and it does exactly what you want, or more really,
since this actually marks the matches it finds and you want to check for
matches before entering data (not mark things that you've already entered
twice.)

But, take a look at the script text that is provided in the folder. Open it
in Script Editor or some other AS editor and run it, with the two sample
database files provided.

It is very cool.

In case, for some reason, you don't have that/those folder/s, then here is
the script text itself. You will not be able to run this, obviously, unless
you have the files and fields referenced in the script available.

Anyhoo, here you go.


-- compares one database to another and marks fields in one if they are
found in the other
tell application "FileMaker Pro 5.0v3"
activate
show every record of database "Original Database"
show every record of database "Old Database"

set field "Match" of document "Original Database" to ""
set orgList to field "Full Name" of document "Original Database"
set oldList to field "Full Name" of document "Old Database"
set matchList to field "Match" of document "Original Database"

repeat with i from 1 to (count of orgList)
if oldList contains item i of orgList then
set item i of matchList to "Match"
end if
end repeat

set field "Match" of document "Original Database" to matchList
show (every record of database "Original Database" whose cell "Match" =
"Match")
sort layout 2 of document "Original Database" by field "Last Name"
show layout 2 of document "Old Database"
end tell

HTH,

Gary


> In a nutshell. I can grab a value from a repeating field in one FMP database
> by converting the field into a list. I grab one of the items and set it to a
> variable. I want to then go and see if a record with that variable9s value
> exists in a specific field in another database.
>
> I tried using: (all nested in FMP Tell Statement)
>
... <clipped>

> My ultimate goal is to
>
> 1 check a repeating field, one repetition at a time. See if that value
> exists in the other database, if it does then it does nothing, if it doesn9t
> exist then a new record is created in the other DB using data from other
> fields in the original db.
>
<clipped>
> Suggestions?
>
> Dan Doughtie
> Augusta GA, USA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Getting a value from one Filemaker DB and see if it exists in another. (From: Dan Doughtie <email@hidden>)

  • Prev by Date: Quark 4.04 : to copy a text doc from other program and paste it in new text box
  • Next by Date: Re: Return Current OS
  • Previous by thread: Re: Getting a value from one Filemaker DB and see if it exists in another.
  • Next by thread: Script Editor Alternative?
  • Index(es):
    • Date
    • Thread