Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Auto date input after printing

Featured Replies

Hi - I am new to FileMaker (Pro 7), though I've worked a bit with Access...

I have created a report which is printed when a button I scripted is pressed. Under this button I have created a field which I would like to be automatically filled in with the date of impression of the report. How do I do this?

I'm sorry if someone has already asked this question - I coudn't find an adequate response.

Thanks!

Use the SetField() script function...

SetField(Report_Date, Get(CurrentDate))

  • Author

What category is that under? Unfortunately I'm in France, working with a French version of FilMaker....

Its under Fields

HTH

Lee

  • Author

I'm sorry, but I still don't understand what to do

Your script should look something like this:

Allow User Abort[off]

Set Error Capture [on]

Go To Layout [Print Layout]

Print[]

If[Get(LastError) = 0]

SetField[YourDateField ; Get(CurrentDate)]

End If

Go To Layout[original layout]

Or a simpler version that doesn't check for when user cancel's etc.:P

Print[]

SetField[YourDateField ; Get(CurrentDate)]

~Genx

  • Author

Thank-you!

In fact, my script just got more complicated. I have a field in ly DB which defines the type of contact (Assos, agency or company). Upon pressing the button, I want not only the field discussed above to be filled in withthe correct date, but I also want FM to print seperate letters depending on the contact type stipulated in the 'Contact type' field. I imagine this is possible?

Thank again for any help! If my boss were not a bastard too cheap to hire an IT guy to create this BDD I wouldn't be hasssling you all. Alas....

Lol, yes, its all possible, we just use the following:

If[YourContactTypeFieldHere = "Assos"]

Do This Stuff

Else If[YourContactTypeFieldHere = "Agency"]

Do This Other Stuff

Else If[YourContactTypeFieldHere = "Company"]

Do This other other stuff

Else

Show Custom Dialog["error" ; "You have not specified a valid contact type"]

End If

  • Author

Great! Now I have to try and find the translations for all the scripts in French and away I go!

Lol, i'm sure it shouldn't be to hard, its only four types in total and they'll be located around the same area. French though eh, i can't say i loved doing that in high school, but hey, anything beat trying to work out Japanese.

~Genx

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.