Solved

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

Posted on 2003-10-30
4
263 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

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…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now