Jump to content

Sorting a set of Found records


webed1950
 Share

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

Recommended Posts

  • Newbies

I have a DB set up and working online, and I can search for records using multiple criteria, and it returns the data to a table format. Now I want to be able to re-sort the 'found' records. When I try to add a simple re-submit it gives me the entire database not the found records. is there some tag or variable I'm missing to get it to do this?

Basically I'd like to be able to sort the table by clicking on the column header (a field name of course) without going back and defining the search criteria.

Thanks, Ed

FileMaker Version: 6

Platform: Mac OS X Panther

Link to comment
Share on other sites

Hi ed

If you are constructing your find through a script - which given that your data is returned in table format, it sounds like you are, you can add a script step

Sort [Restore, no dialog]

or a combination of this - I'm no longer working on ver 6 - the sort script step in 7 is much more user friendly - in 6 of course you need to construct the script step around an actual sort as it calls the last sort at the time the script was constructed.

2 other things...

1. check that in the layout setup>table properties, you have checked - sort data when selecting column

2. also you can add

> constrain found set

and

> extend found set

steps

please don't take my advice as the best solution - I feel eager to help because so many people here help me...

apples!!!

Andy

Link to comment
Share on other sites

  • Newbies

Thanks for the reply, Unfortuantely I am not using a script. Just some CDML tags. I set up a form to get the search criteria, and then output it to a results page which justs lists the data in an html table using [FMP-RECORD] [/FMP-RECORD] tags.

I guess I need to get a more up to date reference and figure out how to do this the 'right' way, instead of the old-school way.

Thanks, Ed

Link to comment
Share on other sites

My HTML and CDML is sketchy at times, so this may be humorous at best...

If your column heading "Column1" refers to the field "Column1", define the heading as:

<a href="[FMP-Link: s]&-sortfield=[FMP-Field:Column1]&-sortorder=descend&-Find"> Column1 </a>

Of course, this is not overly secure since the link criteria are visible in the browser.... but it may work...

Paul

Link to comment
Share on other sites

  • Newbies

Thanks Paul,

That did the trick. I just needed to fix one little glitch in your snippet. The part "&-sortfield=" just needed to be followed with the field name (i.e. Title) not the [FMP-Field: Title] tag.

Thanks, Ed

Link to comment
Share on other sites

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