Jump to content

Applescript to get a value from a FMP cell


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

Recommended Posts

I've got an AppleScript program which starts automatically when an SDHC card is inserted in the computer. The content of the card is transferred onto a specific directory for FileMaker Pro to import.

Up to last week everything was done on the internal disk of my computers. I now have a SAN (Storage Area Network) and all computers have have access to the files.

However, I still need to keep the option to run locally. Therefore. I've created the field "MasterDisk" in the "Preference" table of my FileMaker Pro database. MasterDisk can only have the value "SAN" or "LOCAL".

I want the AppleScript program when starting to go and grab the value of the cell "MasterDisk"

If the value is equal to "SAN" the files contained in the SDHC card is to be copied onto the SAN disk. If the value is equal to "LOCAL" the files contained in the SDHC is to be copied on the local disk of the computer executing the script.

The table Preferences contain only one record. How can I get the value contained in the MasterDisk cell.

I've tried this script and I got an timeout error. I want abcd to get the value "SAN" or "LOCAL" from the Preference filemaker pro table.

tell application "FileMaker Pro Advanced"

set abcd to cell "GMasterDisk" of table "Preferences" of database e "Inventory"

display dialog abcd

end tell

I just thought of that, what about a plist. Can FMP interact with PLIST i.e save and retrieve the content of a specific field.

Regards!

Daniel

Link to comment
Share on other sites

This topic is 4766 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.