Newbies attafire Posted May 9, 2007 Newbies Posted May 9, 2007 I have two date fields, sign in and sign out. I'd like to be able to automatically clear the sign in field when the user inserts a date in the sign out field and clear the sign out date when the user inserts a sign in date. Please help.
Newbies attafire Posted May 9, 2007 Author Newbies Posted May 9, 2007 Its to keep track of equipment. I'd like to keep track of when something was signed out, and if it is out, the signed in field will be blank. When the unit returns, the signed in field will contain a date, but the signed out field will be blank.
AudioFreak Posted May 9, 2007 Posted May 9, 2007 Why not just leave the info in the 2 fields??? This way you have a history of what day it was signed Out and In. What you are doing is almost like 'Well he finished the race so delete his start time". o_@
Newbies attafire Posted May 9, 2007 Author Newbies Posted May 9, 2007 The idea was to quickly see if it is in stock or out in the field. Everyone seems to want to dismiss this as a stupid idea but its not as easy as it sounds! Make it a challenge!
comment Posted May 9, 2007 Posted May 9, 2007 It still doesn't make much sense. Either you keep records, or you don't. If you don't, then click a button "GONE OUT" when the equipment is going out, then click a button "RETURNED" when it's coming back. Actually, even for this, one button is enough. If you want to keep records, then keep them in a related table. A record that has Start but no End is open. If the equipment has any related records that are open, then it's out in the field.
AudioFreak Posted May 9, 2007 Posted May 9, 2007 In that case if you have a seperate table holding the records of when it went out and came back, you could just have a field in the other table that evaluates whether the unit is in stock or Out in the field. Then have a 1 Row Portal displaying 1 field sorted by date created to show the status of the unit in the main table. Hope that makes sense.
Newbies jtjohnson Posted May 10, 2007 Newbies Posted May 10, 2007 I know what you are trying to do and why you want to do it. I have a similar problem that I can't seem to completely nail down. I did come up with a work around for one of my applications. I needed to show a marker (it was a little icon of a red X) when I clicked on a particular location on a picture. I created container fields and placed transparent buttons on top of them. When you clicked the button it simple passed a script parameter to a script telling it which button was pressed and copied and pasted the image from a global container field. If clicked again, it checks to see if the fields are filled, and if they are, it simply clears the icon out of the container. I know that's just a vague overview, but I think it's similar to what you are trying to do? All that being said, what everyone else has already commented on sounds like better logic in this particular application, but I'm new here, and I thought I'd try to offer a suggestion to help.
Newbies attafire Posted May 10, 2007 Author Newbies Posted May 10, 2007 I solved it. What I did was made an auto-enter calculated value for each date. The sign in date is --- if(sign in date > sign out date, sign in date, "") --- and the sign out date is --- if(sign out date > sign in date, sign out date,"") --- because you'll never sign something in before you sign it out and vice versa. Quick and easy. Thanks to all who offered help.
Recommended Posts
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