July 12, 200916 yr I thought I this was going to be an easy task but nooooooooooo... How do I script a Find request where FM looks for the first character only of a company name in a text field? I want to find, say, all the companies beginning with the letter, 'C'. TIA for your help!
July 12, 200916 yr Try: ==C* --- Note that this an "unindexed" search - if you want to make it faster, define a calculation field returning the first character and search there instead. Edited July 12, 200916 yr by Guest
July 12, 200916 yr Author Note that this an "unindexed" search - if you want to make it faster, define a calculation field returning the first character and search there instead. Ah! Great idea. Thanks again!
July 12, 200916 yr I made a quick sample file of a technique I have used. This was inspired by a version 3 file by Don Wieland, AlphaJump and updated when version 7 came out by someone, using one script, and Script Parameters, I think it was Matt Petrowsky. If I'm in error of the second credit, please let me know. Lee AlphaButtons.fp7.zip
July 12, 200916 yr How could this be indexed? ?? How could calculating the first character of an indexed field present an indexing problem? AlphaButtons.fp7.zip Edited July 12, 200916 yr by Guest
July 12, 200916 yr How could calculating the first character of an indexed field present an indexing problem? No one said that.
July 12, 200916 yr No one said that. ?? YOU said that. What exactly is the indexing problem you perceive here? Like bcooney, I just don't know where this perceived indexing problem could come from.
July 12, 200916 yr It's your same issue of not reading what is said, Bruce. If you are going to say that Comment said something, quote him. Because he did NOT say that at all. Re-read it.
July 12, 200916 yr Can you please elaborate, comment? I would like to better understand why creating a calc field that contains just the first letter of a field would perform better (via its index) than a company name field (which I assume is indexed--or will be as soon as a find is performed).
July 12, 200916 yr The company field will be indexed, but some types of searches cannot use the index. An exact match is one of those, and a wild card is another - here you have both.
July 13, 200916 yr but some types of searches cannot use the index. An exact match is one of those, Could possibly be true, but could you lead me to sources explaining this? --sd
July 13, 200916 yr Not really - but I believe the fact that an exact match differentiates between records beyond the index limit is a good indication.
July 13, 200916 yr Well, I'm afraid I'm taking comment at his word. A field that contains only a letter will generate a corresponding index, and a whole word index wouldn't be helpful in this scenario. I would like to read a more in depth description of indexing, also.
July 15, 200916 yr I'm afraid I'm taking comment at his word. One could usually as a practical approach, only it isn't particular socratic. Well my gray matters are honestly slow as molases in these days, and I havn't yet realized to depth to his statement. I can't help thinking of this: We are a culture without the will to seriously examine our own problems. We eschew that which is complex, contradictory or confusing. As a culture, we seek simple solutions. We enjoy being provoked and titillated, but resist the rigorous, painstaking examination of issues that might, in the end, bring us to the point of recognizing our problems, which is the essential first step to solving any of them. ...it's not the best approach to learning, to remember all the exceptions by heart. --sd
Create an account or sign in to comment