Solved

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

Posted on 2003-10-30
4
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

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

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…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…

733 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