June 26, 200718 yr Newbies Prior to FMP7, if you got the cell "OtherDb::afield" and there was more than one related record, you got a list of the values of the related records. (This was a pain in that if there was only one related record, you got the value plain instead of a one-item list, but that was manageable). In migrating a very old database up to FMP8.5, that seems to have broken: getting a cell or a field from a portal only gives me the first related record, and I can't find any way to get all related records. I think this change happened with the introduction of the Table class in FMP7. Has anybody had success in getting multiple related records via AppleScript?
June 26, 200718 yr "... getting a cell or a field from a portal only gives me the first related record." It sounds like the field is from a different table occurrance (TO) than the portal: they must be exactly the same. I'm not quite sure what you mean, but functionality in FMP 8.5 is *increased* from earlier versions. Take a look at the List() function, it might do what you want, if you want related values in a calculation field.
June 26, 200718 yr Prior to FMP7, if you got the cell "OtherDb::afield" and there was more than one related record, you got a list of the values of the related records. I'm pretty sure you're mistaken. List() may work for you needs or a custom function that includes the GetNthRecord function. No need for Applescript. PS: Just realized that sub forum this was in. You might be right about using Applescript to grab the 'cell' of a related record. I don't know much about Applescript. Edited June 26, 200718 yr by Guest Add PS
June 28, 200718 yr Author Newbies Well, the AppleScript behavior has certainly changed (and the portal field is the same). But it looks like I can create a field in the layout whose value is calculated and uses the list() function, then use AppleScript to get that. Since I have an existing script that does a fairly complex mail merge I'd rather not rewrite the whole system using native FileMaker scripting (which is immensely more powerful in 8.5 than it was in, oh, say, FileMaker-pre-Pro when this db was created). Thanks for the help.
Create an account or sign in to comment