Rob 7 Collins Posted June 1, 2005 Posted June 1, 2005 (background) As a user I might like to search for "apples" or "oranges". I want the Found Set to contain records of apples, and as well records of oranges. Being a reasonably able user, I find apples, then extent the found set. But, I could perform an OR search. To do this, first Enter find mode, then put "apples" in the field. Next, create a new record, and put "oranges" in the field. Then run the find. So far so good? Okay, here's the question: I've a table, fruit, with fruit::names like "apples", "oranges", "grapes". Fruits come and go in the fruit table. On some other layout I want to built an OR search, based on every record in fruits. I want to do this in a script, but I can't bounce between fruits and the other layout -- because I need fruits to stay in browse mode and the other layout to stay in find mode. How do I script this?
-Queue- Posted June 1, 2005 Posted June 1, 2005 Create a value list called Fruit, based on all names in the fruit table. Then script your find in the other table as follows: Allow User Abort [Off] Set Error Capture [On] Go to Layout [based on secondary table] Enter Find Mode [] Loop Set Field [2ndTable::fruitname; Substitute( MiddleValues( ValueListItems( Get(FileName); "Fruit" ); Get(RequestCount); 1 );
Rob 7 Collins Posted June 1, 2005 Author Posted June 1, 2005 Wow man, that's gorgeous. I can understand it at a glance! thank you Value Lists, ...I'd not have guessed.
Rob 7 Collins Posted June 21, 2005 Author Posted June 21, 2005 Queue, this post helped me tremendously. I posted a sample file that performs a search of user defined terms across every tree in a relationships graph, available here: http://www.fmforums.com/threads/showthre...;vc=#Post164412 Which is the fruits of that effort. Thank you.
Recommended Posts
This topic is 7098 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now