February 22, 200620 yr 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
February 22, 200620 yr Author 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.
February 22, 200620 yr 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
February 22, 200620 yr Author 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
February 22, 200620 yr Author OK, I got the first issu solved. I just had to add "of current record" after "Assets_title" Still need help with the others.
Create an account or sign in to comment