Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum
Jabert

Records don't stay in sort order when displayed in portal

Recommended Posts

Jabert

I have a file that sorts some records, then displays them in a portal. The sort is on three fields (HD, Last Name, First Name). Most of the records have a blank in the HD field so, when they are sorted I get the HD fields lafter all the records that do not have a "Yes" in the HD field. When I sort the records they display properly, but when viiewed in the portal the records only appear in Last Name, First Name order. Please see the attached file for an illustration of my problem.

 

All help greatly appreciated.

DB 9:22.fmp12.zip

Share this post


Link to post
Share on other sites
AHunter3

Sorting records has no effect on the sort order of records as they appear in a portal.

 

The way you sort records in a portal is to sort the relationship that the portal depends upon. Not by sorting records, which affects only the order of the records in the local native table, not the records in the portal.

Share this post


Link to post
Share on other sites
Steve Martino

Sort the portal by:

HD descending

Name~Last Ascending

Name~First Ascending.

 

I don't know what HD is suppose to represent, but you could auto enter a No when creating a record, if everyone starts off as a No, then you wouldn't have a blank.

Share this post


Link to post
Share on other sites
Jabert

Thanks, but I am not sure what you mean by "sort the relationship that the portal depends upon". Can you please explain?

Share this post


Link to post
Share on other sites
AHunter3

Relationships, when you set them up, have the option of being sorted. Let's say you have a table of Clients and a table of Jobs. Each job has a client ID and Clients and Jobs are related like this:

 

Clients_______ Jobs

 

Client ID = Client ID

 

 

 

If you have a portal from Clients to Jobs, the portal shows the jobs of that client. With me so far?

 

Well the order in which those jobs will appear is simply the order of record creation: first job created will be on top.

 

Unless you sort the relationship. You can sort the relationship by Date Created, descending order, and then the most recently created job is on top instead. Or you can sort by Job Title. Whatever you want.

 

Meanwhile, sorting the records only sorts the found set of Clients records by whatever you attempt to sort by -- because you're on a layout showing records from Clients, hence those are the records that get sorted. Doing so has no effect whatsoever on the Jobs in the portal to Jobs that you created.

Share this post


Link to post
Share on other sites
Jabert

I;m not quite getting it. I created a sort relationship (at least I think I did), but it does not seem to work. I am attaching a ZIP of what I did. Could you please look at it and tell me where I went wrong?

 

Thanks again.

XXX.fmp12.zip

Share this post


Link to post
Share on other sites
AHunter3

You created a second occurrence of Grid Data (Grid Data 2) and the relationship from Grid Data 2 to Persons is indeed sorted, but you aren't using Grid Data 2: your layout is showing records from Grid Data, not Grid Data 2.

Share this post


Link to post
Share on other sites
Jabert

Hi

 

Sorry to be so thick, but I still can't get this to sort the protal. Could you please look at the attachment and tell me what I am doing worng?

 

Thanks

DB 9:27.fmp12.zip

Share this post


Link to post
Share on other sites
AHunter3

Your database is corrupted. It appears to have 3 records in the Grid Data table, but they have no value for Assigned Pickup Date; and when I created a new record I could not scroll back to the original records or delete them, nor could I modify their value in the Assigned Pickup Date field.

 

But I managed to create a new record and type in an Assigned Pickup Date. The portal appears to be working normally.

 

Did you recover this file? Did it crash and refuse to open at some point?

Share this post


Link to post
Share on other sites
Jabert

The file was never crashed, nor did I try to recover it. It was created in .fmp7 format using FMP 11, however something happened to my Mac and I can no longer open FMP 11. This forced me to convert the file to FMP 14 (fmp.12 format).

 

I tried a recover on the file this morning, but it still does not sort correctly.

 

If possible, could you please send me a copy of you modication? That way I can probably easter egg what I am doing wrong.

 

Thanks again for your assistance.

Share this post


Link to post
Share on other sites
AHunter3

Here you go

DB9_27.zip

Share this post


Link to post
Share on other sites
Jabert

I guess I wasn't very clear. The objective was to list all the people for a given day, with those that required Home Delivery listed together at either the top or bottom of the Grid Sheet. I downloaded the sample you sent but it does not appear to do that. also,

 

I noticed that the grid sheet you generated had no start date, but had a date in the Start Day field. It should have date in tthe upper field, and a day (Monday through Saturday) in the lower one.

 

I have put a new set of sample records in the attached file. There are two or mor HD requirements in each (Mon. thru Sat.) grouping

 

I regret taking so much of you time. If this sort is really not possible, please let me know and I will give up the idea altogether.

 

Thanks again

Share this post


Link to post
Share on other sites
AHunter3

??? I don't SEE an attached file ???

Share this post


Link to post
Share on other sites
AHunter3

I misled you somewhat when I said "the" way to control the sort order of a portal is to sort the relationship. It's one of two primary ways, the other method being to sort the portal itself, in the Portal Setup windows. Either way works. Problem is, you're doing both simultaneously. I removed the sort order from Portal Setup.

DB 0_29__4.zip

Share this post


Link to post
Share on other sites
Jabert

Sorry this took so long...thanks again for you patience.

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

Terms of Use