Jump to content

Please explain - sorted relationship and data tunneling


ddreese

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

Recommended Posts

If someone could please tell me what I'm doing it would be very much appreciated, apparently logic fails me today.

The attached picture was what I came up with to try and track down where things were going wrong in my database. In the example I have two portals, the same relationship except one is sorted and the other is not (through relationship, not through the portal). The data in the portal is correct and exactly how it should be. Below the portals are the fields from the portal, like if I wanted to show the first record from the relationship (which is exactly what I want to do) without using a portal. The (first) vendor field in both portals is from the data tunneled set (the L_pe_pt_pv_* TOs). The second Vendor field in the sorted portal is from the L_pe_pt_sorted TO just to make sure it's the same as the L_pe_pt_pv_sorted vendor ID for that record.

The problem I have is that the relationship (L_pe_pt_pv_sorted) is not looking at the related vendor from the first record of the sorted related set (like I would expect it to). Nor is it looking at the related vendor of the first record of the non-sorted set. It appears to find whatever has the lowest vendor ID from the related set and display that.

There is NO sort on the L_pe_pt_pv_sorted TO, it is all on the L_pe_pt_sorted TO (which is shown in the picture). Neither portal is sorted, either.

I really don't understand why this is happening, it seems logical to me that it would display the vendor ID of the first record in the sorted portal. I mean, otherwise isn't the data tunneling more or less worthless?

My workaround was just to put a portal on the layout to display the data, but I really don't think it should have to be like that. Clarification would be greatly appreciated.

data_tunneling_2.gif

Link to comment
Share on other sites

There is NO sort on the L_pe_pt_pv_sorted TO

This would be why the Vendor fields from L_pe_pt_pv_sorted TO are showing the earliest created record. The Sort only applies to the TO where the sort is applied.

I agree it seems odd in this case of the

One -< Many >- One

but if the relationship were instead,

One -< Many -< Many

would it make sense to have all the grandchildren sub-sorted by the child?

Anyway, like it or not, you have to work around it.

Link to comment
Share on other sites

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