Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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.

Posted

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) ]

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted

Cool, thanks for letting me know.

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 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.