Solved

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

Posted on 2003-10-30
4
265 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
4 Comments
 
LVL 3

Accepted Solution

by:
Mariano_Peterson earned 75 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 75 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

777 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