Jump to content
  • 0
Jabert

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

Question

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

15 answers to this question

Recommended Posts

  • 0

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
  • 0

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
  • 0

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
  • 0

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
  • 0

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
  • 0

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
  • 0

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
  • 0

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
  • 0

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
  • 0

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

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


×