July 21, 200421 yr The order of your year fields appears to be reversed. Insert Calculated Result [DATE, LOW DATE & "..." & HIGH DATE] should work, if the fields are truly number fields.
July 21, 200421 yr I read this to say that the dates are just the four digit years and the are Number fields and that Your High and Low dates are number fields (maybe globals). If that is correct, then this script should do it. Enter Find Mode [] Set Field [
July 21, 200421 yr Hi, My bad. Didn,'t read the thread. Though. "Your High and Low dates are number fields (maybe globals)" Must be globals actually. If not "..." is entered alone. Unless Lee meant "global fields (maybe number)"... "Low...High" is reversed though, but it shouldn't give you the error you've got. Note that even reversed, it would work with global Num fields, while it won't with global Text Fields
July 21, 200421 yr Ok, ok, it was a little hint (albeit not very well expressed hint), that the fields need to be global numbers. Thanks UGO for making this point better than I. You won't get very far if you use regular fields, FM will complain about it. Also, I didn't catch the fields being reverse in the post, although I did show them correctly in my script. BTW, if they are reverse, FM will find dates matching the highest number, at least that's what it did in a little test I made. (I don't know why it picked the highest number though). Lee
July 22, 200421 yr Author Hey everyone: I tried what Lee suggested Enter Find Mode [] Set Field [ U_Database.zip
July 22, 200421 yr You weren't paying attention. We made a big thing of about the Low and High fields having to be Global fields. Yours are not. Change them to Global and it works. When you change the fields to Global, add the g_ in front so that you will know in the future that these are global. BTW, when you change them from number to Global - Number, FileMaker will warn you about the loss of data, but this shouldn't affect your files, as your data is really in the other field. Lee
July 22, 200421 yr Author You were totally right, Lee. I changed the low/hi fields to globals, and the script now works. Sorry for not listening carefully enough the first time. Thanks for the help!
Create an account or sign in to comment