stann Posted February 19, 2004 Posted February 19, 2004 Hello I have buttons for dates about 30 all with dates on them then I have a button with "..." (the range find symbol) Is there a way for filemaker to go to find mode and when the user clicks the first button puts the result in the find field then and only if he puts in a second button places the "..." symbol there? In other words if I click just one button it finds that date only , But I want to be able to click 2 buttons and have it insert the "..." and even perform the find after the second button is clicked if possible. Thanks STAN
jscooper Posted February 19, 2004 Posted February 19, 2004 You can have each button call a script which will enter find mode (if not already IN find mode) then insert the date. If a date already exists, then insert "..." & date (just make sure "select entire contents" is unchecked so you don't wipe out what's there). As for performing the find, you can, at the end of the script, check to see if "..." exists in the field. If so, then the criteria is complete, so you can execute the search. Of course, for a single date search, at least two buttons will need to be clicked .. one to set the date, another to say "I'm done ... now search!" Jeff
EddyB Posted February 19, 2004 Posted February 19, 2004 Hi Stan, Make sure you are in find mode before pressing buttons, then here is an example of the script if the button said 31/12/2004 If [isEmpty(DateField)] //checks to see if this is the first button pressed or the second Insert Calculated Result [select, "DateField", ""31/12/2004""] //if it is the 1st time a button is pressed it will enter the date into the date field Else Insert Calculated Result ["DateField", "TextToDate(DateField) & "...31/12/2004""] //if it is the second time a button is pressed it will add ...31/12/2004 Perform Find [Replace Found Set] End If HTH Ed. Jeff replied as I was composing this reply, we've pretty much said the same thing...
stann Posted February 19, 2004 Author Posted February 19, 2004 Thanks for the answers I had already changed the date fields to a text field with the year and the week Like 0408 8th week of 2004 so I would be looking to automate a range like 0408...0419 for example. So the number of characters would always be the same then there is probably another way to accomplish this. STan
Recommended Posts
This topic is 7652 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