Jump to content
Server Maintenance This Week. ×

Related records


This topic is 7002 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm working on an AppleScript to sort images with the help of Filemaker...

tell application "FileMaker Developer"

tell document "mydatabase.fp7"

activate

tell layout "all"

go to cell "c_fileName"

show (records whose cell "c_fileName" is [color:"red"]FileName)

set ownrName to cell "Manufacturer"

set mnfrName to cell "Manufacturer"

set pdctName to cell "subBrand"

end tell

end tell

end tell

now this works great if I use:

property FileName :P "DTM_13380.jpg" --- or --

set FileName to "DTM_13380.jpg" as text

but NOT if I get the file name this way:

set defTID to AppleScript's text item delimiters

set filePath to (choose file) as string

set AppleScript's text item delimiters to ":"

set FileName to last text item of filePath

set AppleScript's text item delimiters to defTID

Ideas?

TIA

Link to comment
Share on other sites

man! -- Now it works! how long was I fretting over this...I lost track. My code works on the current found set. When I tested with the property value, it left the found set with 1 record. The next time I tested the script I clicked on a different image -- and it (of course) couldn't find it.

Let that be a lesson to me...

Link to comment
Share on other sites

This topic is 7002 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.