Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

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?

Posted

"... 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.

Posted (edited)

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 by Guest
Add PS
  • Newbies
Posted

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.

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