Steve Jensen Posted March 31, 2005 Posted March 31, 2005 Help!!! I have some folks back east using a solution I developed, but for some reason they get different answers than I do when running certain scripts. Specifically, the database includes data that has section numbers (Section 1, Section 1.1, Section 2.3.5, etc.). I have a script that will constrain the found set to just one section. The script parameter is set to the appropriate section number depending on the button that called it. Assuming I'm looking for section 4, the script does the following: goes to find mode pastes "4." into the section number field (this finds 4.1, 4.2, etc.) makes a new find request pastes "=4" into the section number field (this finds "section 4", which doesn't have the period) performs the find sorts On my computer, finding "4." returns all the records that BEGIN with "4."... On their computers back East, it returns every record that CONTAINS "4.". I get: 4 4.1 4.1.1 4.1.2 ... They get 3.4.1 3.4.2 4 4 4.1 4.1.1 4.1.2 5.4.1 7.2.1 ... Why would this be so different? The files are identical, so why is the behavior different? Thanks!
Walter B Posted March 31, 2005 Posted March 31, 2005 Without actually seeing your solution, and based on my experience with scripting in 7, my would be that there is a difference in privileges between your account and their's. You as a full access user can pass the parameter without issue, but, if you've limited the users' privileges, it may not be passing the parameter. Remember that in the new security model, the default is to lock down access as much as possible. You as the developer have to open it up. Hope this helps.
Himitsu Posted March 31, 2005 Posted March 31, 2005 Steve, if your field is a text or the calculation is set to return a text value, that will happen. Remember, text field will look for anything containing those values. So if you had a four names, Amy, Cathy, Chris, Alex, and you searched a field for "a", it would return everbody but Chris because Chris doesn't contain an "a". Now, a text field will do the same thing with numbers. So first check to see if that field is a number field. If it is, then go to the calcuation and at the bottom, there is a pull down that says calcultion is a text or number of date, ect.. see if that is number. Those are the first places to look.
Himitsu Posted March 31, 2005 Posted March 31, 2005 Steve, after looking at your post again, why don't you have a seperate field with the Main number being a category number then the different versions being related to that Main number? That way, you could contain all the versions with in 4 and show a more organized way of putting your data together. You could have a field that is a calcuation that will build the whole version number so you could use that for a pull up menu on another table. That way if you had to search for version 4, you could have the specific field entered with 4 in your script. When I put a table together, I think of the breakdown and where the data has common relationships. It will allow you to add more options in the future even if you were not going to use them immediatly. Just something to think about.
Steve Jensen Posted April 1, 2005 Author Posted April 1, 2005 Brilliant! actually, I already have a field that has just the first number of the ID... just forgot about it. I still don't understand the difference in behavior between my machine and theirs... same file, same software versions, same database, but different answers. However, this should fix the problem for now. Thanks again!
Himitsu Posted April 1, 2005 Posted April 1, 2005 Steve, just check to see you are working with number fields not text fields. And, like Walter said, I think their is a check box that lets you use the script with all access to all accounts. Check that too.
Steve Jensen Posted April 3, 2005 Author Posted April 3, 2005 Well, I changed the script, which fixed the immediate problem. What's strange, though, is the different behavior between his machine and mine. When he types in "4." into the section ID text field (it is text, by the way), it finds every field with a "4." in it. When I do it, (same database, same permissions), it only finds those fields that begin with a "4." I've been using Filemaker since version 2, and I've gotta say I'm stumped!
LaRetta Posted April 3, 2005 Posted April 3, 2005 Hi Steve, You will achieve the result as you've described if one of the fields is set to Unicode and the other set to English (or Default) under Storage Options. You will get (8) lines returned finding on '4.' as indicated in your 'theirs' list (exception is last line which had no 4) using English or Default. Same find '4.' on a text field set to Unicode storage will produce your list, ie, the 4 lines only beginning with 4. Doubt they are number fields or you would only get one record returned (the lonely 4). This may not be your issue, but it's worth taking a look. I had to try to figure this out ... the illogic of it was driving me buggy. I wonder whether installed fonts or font settings might make a difference as well? LaRetta
Recommended Posts
This topic is 7174 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