Jump to content
Server Maintenance This Week. ×

getnthrecord and data tunneling


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

Recommended Posts

I'm guessing these two don't work together. The attachment is a screenshot of my relationship graph and field definition.

I have no issues with getting the correct data from the L_placement_episode_pt_current TO, but the data I get from the L_placement_episode_pt_current_pv TO is random and not what I was looking for. A workaround is that I can have a CALC field in the the L_placement_episode_pt_current TO looking to the other TO, but that seems too FM6 for me.

I'm using getnthrecord because the the L_placement_episode_pt_current TO is sorted and I want the second record in the found set.

Any suggestions?

data_tunneling.gif

Link to comment
Share on other sites

I don't think Filemaker selects the result of a calculation at random. If you place a portal to the source table next to your calc field, you should see that the calculation returns data from the second row of the portal. As a rule, relationships ignore found sets.

Link to comment
Share on other sites

Well no, it was not at random, but it didn't seem to follow a set pattern, either. I did put the portal next to the calculation and it seemed to work fine, until I deleted the first record in the portal, you'd think the calculation would have changed... But it didn't, it stayed the same even though the data was now the first record of the portal. Weird weird stuff.

A better workaround that I've found (since I'm more or less just displaying the information and not doing anything with it per se) is using a portal and just starting the portal at the second record (not sure if this is a new feature or not, but it's handy). I think that may be the best way to go about what I was trying to do, though I'm not sure if I'm going to be screwing myself for something else just yet. I guess we'll see.

Link to comment
Share on other sites

But you still have to do something to refresh the screen. I'd suggest using a script to delete the portal row. First script step: Freeze Window. That way after the row record is deleted the screen will refresh. You're just dealing with the ordinary effects of related record calculations and what makes them refresh.

Link to comment
Share on other sites

The portal is not set to sort, the entire relationship is. It's just something I do as a habbit to minimize problems later.

Also, I had a manual refresh button on the screen and it didn't update the information. Also I popped into layout mode and back into browse mode and it still didn't update.

The more I think about it, the more I realize I really don't need to use getnthrecord just so I can display the data on the screen. Now if I was doing any sort of calculations based off that information or whatever, maybe that would be more helpful. I think I'm just going to give up on the idea for now, and scurry back to my FM8 n00b cave ;)

Thanks for all the help and suggestions :

Link to comment
Share on other sites

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