Jump to content
Sign in to follow this  
VirtualBob

Find multiple words [OR]

Recommended Posts

I want to have some way of finding any of a group of words in a field. Creating multiple finds creating Find > New Find > New Find etc is cumbersome if I make a mistake or need to update it.

Ideally it would be some sort of string of words with a loop script.

BTW I'm using version 7 and it doesn't seem to have setfield as a function, even though it mentions setfield in the help menu, which is confusing. I saw an example using setfield but it didn't work - just said couldn't find the table "setfield".

Share this post


Link to post
Share on other sites

You would need to create a new request for each time you are OR'ing ... and you're wrong Set Field[ is manditory knowledge when scripting, since inserts or pastes are dependent of the presence of the field in the actual layout.

For your loopings, which is the way I would choose too, could a global field store the values you wish to search for pilcrow delimited - since you're on fm7 must the scripting utilise recursion in the absence of $variables.

The matter can be done as shown above!

--sd

ORSearch.jpg

Share this post


Link to post
Share on other sites

1. GetValue() is not available in version 7.

2. I believe this could be simpler if using:

MiddleWords ( gSearchPhrase ; Get (RecordNumber) ; 1 )

in a loop.

Share this post


Link to post
Share on other sites

1) I did for a short moment think of it but forgot to check, thanks for catching it!

2) True! ...I merely gave various options to choose from, to display a method not too dependent on reading in fields ... if it really gives a snappier performance should be unsaid, but $variables seems to give this.

--sd

Share this post


Link to post
Share on other sites

You could make it faster by loading the global into a script parameter - but really, what's the rush?

Share this post


Link to post
Share on other sites

Well just to "air" that it could be a consideration occasionally!

But as such just socratian noise! My take here is, if people just need solutions should they learn to delegate the task at hand, but if they want to learn their ways with the tool will the ambiguity be beneficial to this process.

--sd

Share this post


Link to post
Share on other sites

Thanks in for your replies - I'll give it a go!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Steve Martino 
×

Important Information

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