Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How to search/find a record within a found set (but still keep the found set) ?


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

Recommended Posts

Posted

I have a database which serves as a data collection device. Within a found set,  I want to be able to navigate to a record (by doing a search within a specific field) which brings up that searched record but still within that found set.  In other words, I do not want to loose my original found set after performing the search for a particular record.  Any help is appreciated.

Posted

Are you using v12 or v13, you posted this question in the general topic for 13, but your profile shows as v12.  if you are now using 13, then update your profile by going here MY PROFILE and update all pertinent information. If you are still in v12, then I will move this to the proper topic.

 

Lee

Posted

Within a found set,  I want to be able to navigate to a record (by doing a search within a specific field) which brings up that searched record but still within that found set. 

 

That's a contradiction in terms. A search does not "navigate" - it modifies the found set. Can you elaborate more on what exactly do you want to accomplish here?

Posted

I think he might need GoToRecord (after establishing the found set) as opposed to a second find. Comment is correct. Performing a find changes the found set.

Posted

If I'm interpreting this right, Rick has the right idea. The question, then, becomes: how does one "perform a search" (not a real find) within a found set, and go to that record?

 

One quick and dirty way:

 

1) If you are always going to be searching in one field, place a global in the header, and a button with it (if you need to search different fields, make a second global with a drop down list of your fields, so you can select which field you want to "search" in).

 

2) Enter your criteria into the global, then press the button.

 

3) Have the button perform a looping script that loops through your found set and stops when it finds a Patterncount match of your criteria in the specified field.

 

Is that what you want? The downside is that if you have multiple matches, you'll stop on the first one, but there are ways around that, if you like.

Posted

In version 13, you can use the new summary field "List of" option to get a list of values in the current found set. Assuming all records of the found set have a (not empty) value in the field, you can calculate which record to go to directly, without the need for a loop.

 

 

The downside is that if you have multiple matches, you'll stop on the first one, but there are ways around that, if you like.

 

I don't think there is a way to go to more than one record, is there?

Posted

Easy-peasy - just open a NEW window, same layout - do your stuff (search, find, sort, whatever) and when done, just close the new window. Then you are back to the old found set and the original record !

 

/Kind regards 

Posted

If I'm interpreting this right, Rick has the right idea. The question, then, becomes: how does one "perform a search" (not a real find) within a found set, and go to that record?

 

One quick and dirty way:

 

1) If you are always going to be searching in one field, place a global in the header, and a button with it (if you need to search different fields, make a second global with a drop down list of your fields, so you can select which field you want to "search" in).

 

2) Enter your criteria into the global, then press the button.

 

3) Have the button perform a looping script that loops through your found set and stops when it finds a Patterncount match of your criteria in the specified field.

 

Is that what you want? The downside is that if you have multiple matches, you'll stop on the first one, but there are ways around that, if you like.

 

Thanks KaosMaker. I can follow your thinking but I just can't make it work, most probably due to my limited knowledge when it comes to calculations. I know how to do looping scipts but wonder if you could tell me what script you had in mind to find the pattercount match within my found set.  What I had was:

 

 

Find Matching records [Extend records for trial plan for fm converted::plot[PatternCount ( trial plan for fm Converted::Plot ; trial plan for fm Converted::Go to plot )]]

 

where "Go to plot" is the new global field I created for me to enter my criteria in to and "Plot" is the  field that I am searching in.  

 

As I am only going to be searching in one field and it does not matter if it stops at the first match, I feel your solution should work for me.

Easy-peasy - just open a NEW window, same layout - do your stuff (search, find, sort, whatever) and when done, just close the new window. Then you are back to the old found set and the original record !

 

/Kind regards 

Thanks Lape - thats the problem when I close the NEW window it goes to the original record ...I want it to go to the found record.

Posted

In version 13, you can use the new summary field "List of" option to get a list of values in the current found set. Assuming all records of the found set have a (not empty) value in the field, you can calculate which record to go to directly, without the need for a loop.

 

 

 

I don't think there is a way to go to more than one record, is there?

Thanks for the advice. I have taken a look at this.  the "list of" option does work for me as I have values in every field.   I assume when you say I can calculate which record to go to directly this is done by eyeballing the list for my desired record and then using Go to record script (eg 3 out of 65) to take me there?  Thanks for your help.

Posted

Thanks for the advice. I have taken a look at this.  the "list of" option does work for me as I have values in every field.   I assume when you say I can calculate which record to go to directly this is done by eyeballing the list for my desired record and then using Go to record script (eg 3 out of 65) to take me there?

 

An implementation of comments suggestion:

QuickAndDirty_eos.fmp12.zip

Posted

I did this with a global variable inside the table in which you perform search. Here is how (if i remember well):

 

1) For example if you have a table with client records you can make a "global field client" within that table that would match for example clients reference (or surname, or any other criteria).

 

2) Duplicate this table and make a relationship where "global field client"in the main table = "client reference" in the duplicated table.

 

3) Than all you have to do is typre a reference (name, surname...) in this global field and use "Go to related record" from duplicated table using Current layout. This will take you to the record you are seraching for while keeping all the records in the found set as they are.

 

Hope this helps, i know it worked for me just fine...

Posted

I did this with a global variable inside the table in which you perform search. Here is how (if i remember well):

 

1) For example if you have a table with client records you can make a "global field client" within that table that would match for example clients reference (or surname, or any other criteria).

 

2) Duplicate this table and make a relationship where "global field client"in the main table = "client reference" in the duplicated table.

 

3) Than all you have to do is typre a reference (name, surname...) in this global field and use "Go to related record" from duplicated table using Current layout. This will take you to the record you are seraching for while keeping all the records in the found set as they are.

 

Hope this helps, i know it worked for me just fine...

Thanks Milanm, looks like I have founmd a solution but will keep this one in mind.

Posted

An implementation of comments suggestion:

Eos and KaosMaker, thanks guys you are amazing.  Have implemented this and it works a treat.  Just what I needed.  Quick question EOS, in your file you sent, you have two scripts in the "go" script which a marked by a #........no script just a #. What does this mean ? 

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