thejkfarr Posted January 22, 2012 Posted January 22, 2012 I have a simple date search: global (startdate), global (enddate) and a Search script that throws that into a find on a list of records. works just fine, but the startdate and enddate global fields always retain their old values and never update. minor, but I don't want my clients to scroll months ahead to get to the current date. Maybe i'm doing the whole thing wrong, any advice? Update: I forgot to say, they do update for the search. Upon exiting filemaker and going back in, they default to old values.
Ron Cates Posted January 26, 2012 Posted January 26, 2012 A global holds the value it contained when it was last open in a locall machine environment. When you serve it up on a server, it still holds that last value. Pull the file off your server and open it locally, clear the global fields, close it, then reserve it. Or you could initialise them on startup with an open script that sets them to "".
LaRetta Posted January 26, 2012 Posted January 26, 2012 Or you can set both values in the opening script to Get ( CurrentDate )
Raybaudi Posted January 26, 2012 Posted January 26, 2012 Or you can set both values in the opening script to Get ( CurrentDate ) Why not to empty ?
LaRetta Posted January 26, 2012 Posted January 26, 2012 Good question, Daniele. My thinking in (appropriately) red, LOL: ... but the startdate and enddate global fields always retain their old values and never update. Update to what? Probably current date. I don't want my clients to scroll months ahead to get to the current date. Confirms it is current date AND that it is probably tied to a drop-down calendar since scroll was mentioned. That's why I answered as I did. If you want it always to open on empty then Ron's suggestion takes care of the other end ... set to empty as stand-alone and leave it be. I was covering the other end. One could also use auto-enter (replace) yada yada but I thought startup was easier since most Developers use startup script and set variables and/or globals at that time. :laugh2:
Ron Cates Posted January 26, 2012 Posted January 26, 2012 When starting empty a drop down calendar defaults to the current date to start with so the second issue is resolved. :)
LaRetta Posted January 26, 2012 Posted January 26, 2012 Indeed! I missed that point! So just empty the globals stand-alone. Thank you, Ron.
Recommended Posts
This topic is 4683 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