T Howard Posted September 22, 2007 Posted September 22, 2007 I would like to have a field automatically insert the current date based upon the condition of another field. I have a container field that has a script attached that inserts a persons signature when they click on "yes" from a question that pops up asking "Do you approve?" Yes, No, Cancel. What I would like to do is have a field called "Approved On" and have the date they approve it automatically inserted. Is there a simple way to do this? Any help would be greatly appreciated.
Fitch Posted September 22, 2007 Posted September 22, 2007 Use Get(LastMessageChoice) to find out what was clicked. I usually put it into a variable: Set Variable[ $choice ; Get(LastMessageChoice) ] Set Field[ Approved On ; Case[ $choice = 1 ; Get(CurrentDate) ]
T Howard Posted September 23, 2007 Author Posted September 23, 2007 Thank you for the information. I have a related question though about how I could have the date inserted into a field based upon a number field having any number being entered into it.
Fitch Posted September 24, 2007 Posted September 24, 2007 You mean using a script, or field auto-enter options? Either way, you could use a simple Case statement such as Case( not IsEmpty(yourNumber) ; Get (CurrentDate) ). In a script you might do it differently, using an If step: If( not IsEmpty(yourNumber) ) Set Field( yourDate ; Get (CurrentDate) ) End If
T Howard Posted September 24, 2007 Author Posted September 24, 2007 Tom, The script suggestions work well but the auto-enter option doesn't. The field that has the number being entered into it is called "Class Funding" and the field I would like the date entered into is called "Funded On". The field "Funded On" is a timestamp field with auto-enter set to calculation and the parameter is "Case( not IsEmpty(Funding::Class Funding) ; Get ( CurrentHostTimeStamp ) )". Thanks for your help.
T Howard Posted September 24, 2007 Author Posted September 24, 2007 Tom, I figured it out. There are two tables involved. I copied the "Funded On" field to the funding detail lines table where the number field being referenced occurs instead of the primary table and it works fine. Thanks again for your help. It was greatly appreciated.
Recommended Posts
This topic is 6330 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