Jump to content
Sign in to follow this  
Steven Cappiello

How do i find the maximum value in a found set ?

Recommended Posts

Hi,

I want to find the Maximum Record ID in my found set so that I can alert my user that there have been new records added to the database by showing the records through a self-join that have a larger Record ID.

Max( ) seems to work on the entire database, and not just the found set.

Can someone make a recommendation?

Share this post


Link to post
Share on other sites

Take the Tailrecursion CF from here:

http://www.filemakerpros.com/GetNthRecordTAIL.zip

...and this CF:

http://www.briandunning.com/cf/757

...and make a combination in the vicinity of what the template here shows!

--sd

theMaxedout.zip

Share this post


Link to post
Share on other sites

A summary field can do that. If you need the result as a calculation, in order to base a relationship upon it, you can use the GetSummary() function.

Share this post


Link to post
Share on other sites

"I want to find the Maximum Record ID"

If the Record ID is auto-entered, and they are sequential, then the "maximum" record ID will be the last record when the found set is unsorted.

Or am I missing something?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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