Jump to content

Capture found set


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

Recommended Posts

Hello,

I have been using the "copy all records" method to capure the found set of IDs.

I think i saw another method that avoids the pasteboard but can not for the life of me track it down.

Think it used a List ( ) method.

Anyone point me in the right direction.

best

Stuart

Link to comment
Share on other sites

Isn't it today GTRR(FS), which by and large have made the previous method a bygone? ...as well as this:

http://www.kevinfrank.com/download/preserve-and-restore-found-sets.zip

...for the remaining of the tasks??

--sd

Link to comment
Share on other sites

Thank you both. Perfect.

Hey Soren, this is the method that i saw John Mark post and it is certainly the method i have adopted for restoring a found set in a failed find script... but... it does not replace CAPTURING the found set of IDs.

A couple of years ago i added the function of saving the found list as a multi-key under one name... and every user adopted it in a flash.

Comment ... this is a great solution ... i have clients who have 25,000 records in contact lists ... i suppose i should test this out or set a limit on the number that can be saved in relation to the fixed number of reps... or loop the script to store them in chunks...

eg: i = Get ( CalculationRepetitionNumber ) + 500 ...

(ps here is the Link this came from, another level deep ... nearly missed it)

I will have a play...

Thank you both ... these are exactly the methods I was thinking of/looking for.

Link to comment
Share on other sites

Hi Comment,

Here is a custom function based on your example ... im sure you can probably get rid of "number" and "empty" but im new to recursive functions and could not...

FoundSet = ListIds ( SerialID ; 1 ; "" )

ListIds ( field ; number ; empty )


//Capture a list from the current found set

Let ( capture = empty & "¶" & GetNthRecord ( field ; number ) ; Case ( number = Get ( FoundCount ) ; capture ; ListIds ( field ; number + 1 ; capture )))

Link to comment
Share on other sites

im sure you can probably get rid of "number" and "empty" but im new to recursive functions and could not

No you can't! Since you have written:

i have clients who have 25,000 records in contact lists

...sometimes this CF might be thrown at all records in the base.

http://en.wikipedia.org/wiki/Tail_recursion

Checkout the template here:

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

Do a cmnd-j ...and see what happens with each of the buttons, only the pink button works with such a whopping set.

--sd

Link to comment
Share on other sites

Hey Soren,

Great material...

Seems that by a sheer fluke i chose the TAIL method.

It also seems that by a secondary fluke i am one step away from a solution...

a small tweek and a loop script would allow for setting the "result" of the last loop and beginning from record 10000 on the second loop and so on...

mine specifies the start record up rather than the found count down...

great.

Link to comment
Share on other sites

Hi Comment,

The main reason is for storing mailing list history...

Its an easy way of seeing/storing who received publicity info.

These change each mail out ... it also allows you to restore or reuse a previous list.

I have been using the "copy all records" method since v6 but had assumed with all of the new functions one could avoid the pasteboard.

I think the "copy all records" and my "warning pasteboard will get wiped" dialogue is still the most efficient... which is suprising.

Link to comment
Share on other sites

Sometimes isn't the utilization of Applescript not a problem, so you could stay away from the users clipboard this way:

tell application "FileMaker Pro Advanced"

	set savedTextItemDelimiters to AppleScript's text item delimiters

	try

		set AppleScript's text item delimiters to {"¶"}

		set aVar to field 1 of document 1 as string

		set AppleScript's text item delimiters to savedTextItemDelimiters

	on error m number n from f to t partial result p

		set AppleScript's text item delimiters to savedTextItemDelimiters

	end try

	set cell reciever to aVar

end tell

...just remove the outer tell's when embedding! The reason I use the field 1 is that I always have the recordID as first field, you might have chosen it different, so you would need to chase it in the script editor.

--sd

Link to comment
Share on other sites

This topic is 6203 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
×
×
  • Create New...

Important Information

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