Sunday, March 18, 2018

#1 2017-09-30 06:49:20 am

Registered: 2006-04-16
Posts: 6

Filemaker get a value from a related record

I have a filemaker database with several tables with the same number of records in each. They are all related by the field "Ticker". I am trying to get data from a related record in another related table. I have found this on the web (* whose field "referenceNo" has value "12345" *) but can not make it work with and without brackets and " * ". I see Amy has asked the same question on this forum but has no replies. Other approaches seem to cycle through records searching for a match but if this simpler approach works then that is much better.Below are a few attempts and results:

tell application "FileMaker Pro"
    --set myVar to repetition 1 of cell "Ticker" of record 2 of table "Share prices" -- returns"LVLT"
    --set myVar to cell "price base" of record 2 of table "Share prices" -- returns "53.29"
    set myVar to field "price base" of table "Share prices" whose field "Ticker" = "LVLT" -- error "FileMaker Pro got an error: Object not found." number -1728 from field "price base" of table "Share prices" whose field "Ticker" = "LVLT"   
end tell
Any help please. Roger



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)