Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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.

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

  • Author

I am now using 13 and have updated my profile. Thanks.

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?

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.

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.

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?

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 

  • Author

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.

  • Author

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.

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

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...

  • Author

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.

  • Author

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 ? 

no script just a #. What does this mean ? 

 

That's an empty Comment step.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.