?
Solved

Scipting - A Way to Know the Find of the Current Found Set?

Posted on 2003-10-30
4
Medium Priority
?
284 Views
Last Modified: 2010-04-27
If there a way from an If to test and see if the current found set is what you need it to be (or was)?  Lets say I have 2 types of records in a database; the RecType field is either 'IND' or 'ORG'.  I need the If to detect whether or not the current found set is the result of a specific find (RecType = 'IND').  I should probably mention that I am trying to duplicate something that is working in CDML.  In other words something like...

If Status(CurrentFilteredStatus) = True
   If Status(Current-FindValueItem) = "IND" And Status(Current-FindOpItem) = "="
      ' do nothing
   Else
      ' re-apply filter
   End If
End If
0
Comment
Question by:jfarrance
2 Comments
 
LVL 3

Accepted Solution

by:
Mariano_Peterson earned 300 total points
ID: 9675285
This is much more tedious/difficult to accomplish in a client/server environment than it is using web scripting.  There is no direct way to do this in a client/server environment, you'll have to create a work around.  Basically, you have to create a script that sets a flag when you perform a search, and then you'll have to implement very strict control of the UI so that you can capture any events that effect the found set, and clear the flag when those events occurr.  (Clear the flag if a record is added, omitted, or 'go to related records' is run -- you'll have to be particularly careful if you allow control to leave the current file and go to another file.  Then, you have to check what type of record manipulations the other file performs on the main file as well).

Alternatively, you could also flag all the records in the found set, and record the size of the found set.  Then, when you need to determine if the set has changed, you could check if the current found count is still equal to the recorded found set count.  If the number of records are still the same, THEN you would loop through all the records, checking if each record in the current found count is flagged during the previous find.  THEN, if each record in the found set is flagged, you know the record set is still the same, otherwise, you have to re-apply the filter.  Be careful when flagging in multi-user situations.  You can run into record-locking problems and also you need to flag the records for each user, without affecting the flagged result from finds performed by other user's on the same network.

Sorry I don't have better news for you.  Good luck.

-Mariano
0
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 300 total points
ID: 9723635
I would do a script to do the find and disable the regular find.
That script would ask the find conditions and store the requested rectype in a global field. If you disable script abortion, then the found set has a known rectype for sure, unless the result is no record (can be detected with error 401).
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month17 days, 4 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question