Jump to content

Portal Row Sort Confusion


Stuart Taylor
 Share

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

Recommended Posts

I have 1 Table called CONTACT

Each contact has the following fields:

Name (Text)

ID (Unique auto Entry)

ID_List_g (Global Multikey)

Record_Number_cu (Unstored Calculation)

There are two occurances of the CONTACT Table:

CONTACT_RECORD

CONTACT_LIST

The relationship between the two is occurances is:

CONTACT_RECORD::ID_List_g to CONTACT_LIST_::ID

There are three layouts

One using Table occurance CONTACT_RECORD viewed as a Form:

CONTACT_RECORD_layout

Two using Table occurence CONTACT_LIST viewed as a List:

CONTACT_LIST_NAMES_layout

CONTACT_LIST_IDs_layout

The layout CONTACT_RECORD_layout contains 2 Fields and 1 Portal CONTACT_LIST with 30 Rows:

The Portal contains CONTACT_LIST::Name and is Sorted by CONTACT_LIST::Record_Number_cu

Field 1. CONTACT_RECORD::Name

Field 2. CONTACT_RECORD::ID_List_g

The layout CONTACT_RECORD_NAMES_layout viewed as a list containing 1 Field :

CONTACT_LIST::Name

The layout CONTACT_RECORD_IDs_layout viewed as a list containing 1 Field :

CONTACT_LIST::ID

I have a script to perform a search:

Go_To_Layout (CONTACT_RECORD_NAMES_layout)

Perform Script (FIND_RECORDS_Script)

Sort_Records

Go_To_Layout (CONTACT_RECORD_IDs_layout)

Copy All Record

Go_To_Layout (CONTACT_RECORD_layout)

Go_To_Field (CONTACT_RECORD::ID_List_g)

So at this point I have a portal row on my record with the found set from my ID_List only the portal row is not sorting based on the related unstored record numbers ...

I would love to have some clarification on why this does not behave the way I would expect it to.

Stuart

Link to comment
Share on other sites

Afterthought ... is the Get(RecordNumber) displaying the number of the current portal row ?

This would making my wish to use the unstored record number calc from the table occurance for sorting a little problematic...

(setting each number after the sort would take too long as am trying to optimise speed)

can anyone confirm this behavour?

Edited by Guest
Link to comment
Share on other sites

I got lost in your explanation, but I believe that using Get(RecordNumber) as a sort criterion is pretty much meaningless. Get(RecordNumber) is calculated as a RESULT of a sort.

Note also that a TO can have multiple found sets and multiple sort orders - it all depends on the context. So you cannot expect a relationship to "fetch" a particular sort order used elsewhere. It wouldn't know which one to pick.

Link to comment
Share on other sites

Thanks for your reply ... this has confirmed what i needed to know.

This is an extremely interesting change from 6 to 7/8 its been a while since I wished to put a self related list on a layout.

To achive what I want to in 6 would be a lot more economical in terms of script steps than in 7/8 (much as I love the change)

I have found myself having to sort on both layouts to match my the sort order of my related table (in order to capture the ID order) to the order of my records in the primary table and hope that the sort taking place in filemaker server 8 rather than the client will compensate for this additional step... or maybe I need to rethink my approach...

thanks again

stuart

Link to comment
Share on other sites

This topic is 5655 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.