Jump to content

Toggle Clearing fields based on value in another field


This topic is 6193 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

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.

Link to comment
Share on other sites

  • Newbies

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.

Link to comment
Share on other sites

  • Newbies

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Newbies

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.

Link to comment
Share on other sites

  • Newbies

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.

Link to comment
Share on other sites

This topic is 6193 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.