November 4, 200817 yr I am writing a script to allow Employees to print out their worksheet for a given day. We are supposed to do this every day, but inevitably people will have forgotten and want to print out yesterday's or one from last week. The script moves the user into a layout called 'Timesheet' based on a table called 'Timetracker'. It enters Find mode, successfully pastes the user name into the Name field. Then I want to display a dialog which prompts the user for a date. I'd like it to display today's date as a default. I created a field (within the Timetracker table) to hold this date, and made it a global. The script inserts today's date into this field, then shows the custom dialog. BUT the date is not visible in the field in the dialog (the field shows as empty). And when I click on 'OK' nothing happens, whether I type a date in the input field or leave it blank. The dialog just stays there. I'm in over my head and probably missing something, or it may be a combination of things. Does anyone recognise this behaviour and feel they can point me in the right direction? Thanks as always, Emma
November 4, 200817 yr The script inserts today's date into this field, then shows the custom dialog. The script inserts today's date into this field THEN Committ Record/Request THEN enters Find mode do the search shows the custom dialog with input gDate print
November 4, 200817 yr I don't see how committing would make a difference here. It should work as described, and without seeing the file it's hard to tell what went wrong with the implementation. Maybe it's showing the wrong field?
November 4, 200817 yr If I understood correctly, the script now inserts the current date into the gDate when is in FIND mode.
November 4, 200817 yr Author I think Danielle may have spotted it! Then I got broken off to do something, then Filemaker hung and I had to force quit and now I can't get back in.... And it's raining! Get back to you as soon as I can, and thanks for the ideas.
November 5, 200817 yr Author Isn't it great how after a break you see it all more clearly? No, I wasn't in find mode. But I was displaying the wrong field - it was one created by the original designer, which had the right sort of name, but I forgot I'd created a new one in case his was doing something important elsewhere! Now it all works great. Sorry to have wasted your time....
Create an account or sign in to comment