VirtualBob Posted May 10, 2009 Posted May 10, 2009 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".
Søren Dyhr Posted May 10, 2009 Posted May 10, 2009 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
comment Posted May 10, 2009 Posted May 10, 2009 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.
Søren Dyhr Posted May 10, 2009 Posted May 10, 2009 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
comment Posted May 10, 2009 Posted May 10, 2009 You could make it faster by loading the global into a script parameter - but really, what's the rush?
Søren Dyhr Posted May 10, 2009 Posted May 10, 2009 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
VirtualBob Posted May 11, 2009 Author Posted May 11, 2009 Thanks in for your replies - I'll give it a go!
Recommended Posts
This topic is 5675 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