re: Filemaker Deleting Portal Rows (Dave Bevis)
re: Filemaker Deleting Portal Rows (Dave Bevis)
- Subject: re: Filemaker Deleting Portal Rows (Dave Bevis)
- From: David Crowe <email@hidden>
- Date: Tue, 23 Nov 2004 16:02:12 -0700
Dave;
I don't think I would ever try to script portal manipulations because
they depend on the layout that is currently active.
Why not have the script in FileMaker select the related records and
then have the AppleScript work on the found set?
I think it would be simpler and more reliable.
- David Crowe
Date: Tue, 23 Nov 2004 05:39:47 -0600
From: Dave Bevis <email@hidden>
Subject: Filemaker Deleting Portal Rows
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
i am trying to write an Applescript that will compare fields in a
parent record and in the portal record and then delete the portal
record if it meets the criteria. I used a Filemaker script to do this
when I was checking for an exact match but I need to delete records
based on if only parts of the fields match. I am using a contains
comparison and when it finds a match it should go to the layout for the
related record, find that record ID, delete that record and then return
to the initial layout. I keep getting an object not found message. I
have the script embedded in Filemaker. It is below.
tell document 1
set varcount to count of records
repeat with i from 1 to varcount
tell record i
set varleft to cellValue of cell
"Street1" as string --Field in
parent record
set varright to cellValue of cell
"Nov04List::Address1" as string
--field to match in portal record
set varid to "Nov04List::ID" --unique
identifier of portal record
set varleft1 to first word of varleft
set varleft2 to second word of varleft
if varright contains varleft1 or
varright contains varleft2 then
--checks to see if either word is in portal address
go to layout "Nov04List"
--main layout of portal records
show (every record whose cell
"ID" = varid) --should return only
one record
delete current record
--deletes the current record
go to layout "Find Dupes" --
Back to initial layout with parent
record and portal record
else
go to layout "Find Dupes"
--back to initial layout
end if
end tell
end repeat
end tell
Thanks in advance for any help.
Dave Bevis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden