September 22, 200718 yr 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.
September 22, 200718 yr 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) ]
September 23, 200718 yr Author 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.
September 24, 200718 yr 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
September 24, 200718 yr Author 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.
September 24, 200718 yr Author 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.
Create an account or sign in to comment