Jump to content

How do get data of field in CURRENT RECORD?


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

Recommended Posts

I can't figure out how to get the data of a field of the current record. I want to store it and pass it on to another script.

Here is my FM script that returns data from all of the a particular field in the database:

tell application "FileMaker Pro"

get data of field "Assets_title" as string

end tell

Link to comment
Share on other sites

Actually I would like to just paste the other apple script into the one posted here. So I would just tell FM to perform an external script which would call the Applescript that gets the data I need and uses that to print the barcode.

My barcode printing script is already written, I just don't know how to get the field data from the current record, hold onto it, and use it in the rest of the printing Applescript.

I am open to other suggestions.

Link to comment
Share on other sites

get data of field "Assets_title" as string

You do not want that, cell is the identifier, field gives all values in such as:

{"14", "41", "104", "11942", "11943", "11944", "11945", "11946", "11947", "11948", "11949", "11954", "11964", "11974", "11984", "11994", "12004", "12014", "12024", "12034", "12040", "12041", "12042", "12043", "12044"}




Which is the values of EACH records field x ....To get a value from a record use cell.



So what your script should look like is:




tell application "FileMaker Pro"

cell "Assets_title" as string

set X to result.

end tell

--sd

Link to comment
Share on other sites

Thanks for that. My code was a little different. How do you grab the cell data of the record that is currently being viewed? When I switch records, then run either your scipt or my script, the result still gives me the cell data of the first record.

Below is my code. All I have to do is figure out how to get FM to give me the data of the current record, and tell the Dymo app to print.

By the way, do you know how to do a return line and add text using applescript? The applescript generates the barcode from the cell data, but I'd like to take the cell data and print it below the barcode as well.

tell application "FileMaker Pro"

set the field_content to get data of cell "Assets_title" as string

end tell

tell application "DYMO Label"

loadPlugin name "Tape Editor"

openLabel in "/Applications/DYMO Label/DLS SDK/SDK Examples/Empty12mmTape.DLF"

tell current plugin

addbarcode with "2000" position top size large type Code128B

end tell

end tell

Link to comment
Share on other sites

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