June 20, 200619 yr 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!
June 20, 200619 yr Author What category is that under? Unfortunately I'm in France, working with a French version of FilMaker....
June 21, 200619 yr 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. Print[] SetField[YourDateField ; Get(CurrentDate)] ~Genx
June 21, 200619 yr 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....
June 21, 200619 yr 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
June 21, 200619 yr Author Great! Now I have to try and find the translations for all the scripts in French and away I go!
June 21, 200619 yr 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