Jump to content
Sign in to follow this  
Addam

Showing what's in the found set only

Recommended Posts

Is there a way to have a value list only show the "FOUND SET" and not the entire database?

Example:

Value list (from fieldA)

FieldA:

Adam

Mike

John

Andrew

Perform Find for "Mike" & "John"

Value list:

Mike

John

Catch my drift?

Share this post


Link to post
Share on other sites

Such a feature is not built into FMP as far as I know.

What you could do is create a field that operates as a Tag. When you do a search, tag the tag fields of the Found Set with a value, for example: "Y".

Set up a relationship to be based on all the Fields where the Tag Field = "Y", and base your dynamic value list on that relationship.

Just remember to 'clear' all currently tagged files before doing any new Search & Tag script. This can all be scripted, and although somewhat brute force-ish, it will work -- effectively tagging all Search Results records, and via the established relationship, showing them in the dynamic value list.

One caveat is that this solution does not work too well with multiple users, as each user would 'reset' the Found Set tags of someone else each time they run the script, who may still be using that file.

HTH

Share this post


Link to post
Share on other sites

That actually makes sense! The relationship did work. THANK YOU SO MUCH!

The only issue I have is, in the script step, AFTER the "EnterFindMode" function, I tried using the replace script step after that, but the the script stops after the find results. It never get's to the last one.

Any suggestions?

Share this post


Link to post
Share on other sites

The only issue I have is, in the script step, AFTER the "EnterFindMode" function, I tried using the replace script step after that, but the the script stops after the find results. It never get's to the last one.

That is odd. Basically the sequence of events in the scripting is as follows:

1) Go to related file and find all currently Tagged files

2) 'Un-tag' the found set, using the Replace or Looping SetField function

3) Go to a Search Screen, and Enter Find Mode - pause

4) User can now enter their search criteria - resume script via button

5) Perform Find

6) Tag Found Set, again through Replace or Looping SetField functions

7) Return to Parent file - dynamic value list will have modified accordingly.

The replace function should work, and not leave any stragglers behind, but if all else fails, using the Set Function, and looping through the found set to set all records will always work, and I find it very stable. Just remember to begin and end a Looping script with a Freeze and Refresh Window script step.

Another hint to make this easier is to actually make small scripts, each one doing a particular task, such as TAGGING FOUND SET, UNTAGGING FOUND SET, etc. and then in the master script, put the subordinate scripts in order. Much easier to control and debug that way.

Good luck.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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