Search results missing when sorting search results

Support, Tips and Mods for Matt Navarre's SearchResults technique.
Posts: 36
Joined: Tue Mar 28, 2006 8:41 pm
Location: Pittsburgh
PostPosted: Fri Oct 02, 2009 10:07 am
I have integrated fmSearchResults successfully. We are search seven tables with no problems.

I attempted to add sorting to the search results by editing the "Create Results Lines" script. I wanted to sort my contact results (Table 2) so I edited param 2 to sort by the name field in my contacts table.

When I ran the search the results were sorted but some of the results were missing. For example, if there were five name results it would say "showing 1 to 5 of 5 but it would only list three. If there were more than 10 it would say showing 1 to 10 but only show 9. If there were 6 it would only show 1.

This happened with multiple tables. I verified that I was indeed sorting by a field located in the table.

When I cleared the sort from the script, the issue continued until I quit the file and then reopened the file. At that point it worked normally, but of course was not sorting.

Any help or insight would be appreciated.
Posts: 36
Joined: Tue Mar 28, 2006 8:41 pm
Location: Pittsburgh
PostPosted: Fri Oct 02, 2009 10:41 am
I tried this in the unlocked demo file that comes with the fmSearchResults script and the same issue occurs.

Set the "Person" table to sort by display name and records will be missing.
Posts: 36
Joined: Tue Mar 28, 2006 8:41 pm
Location: Pittsburgh
PostPosted: Mon Oct 05, 2009 12:31 pm
I received the answer via email from John Sindelar so I thought I would post it here for others.

If you sort the results, you need to put a "Go to Record/Request - First" script step immediately following the sort script step. That will resolve the issue.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Oct 05, 2009 2:14 pm
Thanks Patrick! We added a note about this to the documentation on sorting here: http://www.seedcode.com/pmwiki/pmwiki.p ... ts.Sorting
John Sindelar
SeedCode

Return to fmSearchResults

Who is online

Users browsing this forum: No registered users and 1 guest

(855) SEEDCODE
[email protected]
Follow us: