August 4, 201411 yr Hi!  This is a stupid problem but I just cannot figure out how it works.  I've created a small calendar where each day is shown in it own field. Each month the contents of the fields are calculated and placed to correct field so that if the first day of the month is Monday, it is placed to the first field. If the first day of month is wednesday, it is placed to third field etc. (please see the picture). Each of these boxes are named objects.  Then I defined each "box" as a button which starts a script and copy the date in the field to a variable $date (Set Variable [$date; Value:Get (ActiveFieldContents]). But for some reason I get nothing out of it.   What I do wrong?  Kind regards, R2D2
August 4, 201411 yr What I do wrong? If you define the field as a button, this automatically preclude field access – so there is no active field from which to read the contents. A workaround is to allow field entry and fire the script with an OnObjectEnter trigger; read the contents, then commit the record. I've created a small calendar where each day is shown in it own field. I suggest you use a repeating field for this, thus eliminating an overhead of 41 fields with one fell swoop; also, if you'd define the field as a calculation and use Get ( CalculationRepetitionNumber ), each repetition could calculate its own date.
August 4, 201411 yr Author Hi ! Thank you for a quick reply! I actually worked around this problem by using an individual ScriptParameter with each of those buttons. As far as I know the Script Triggers don't work when you access the database via web browser and that's why I try to avoid them.
August 4, 201411 yr I actually worked around this problem by using an individual ScriptParameter with each of those buttons. I was just about to suggest the very same thing. I would also steer you toward a repeating calculation field - see, for example: http://fmforums.com/forum/topic/42617-basic-monthly-calendar-april-06/?p=200289 You do know, of course, that Filemaker has a built-in drop-down calendar, right?
August 4, 201411 yr Author Oh, yes I know there is a built-in calendar, but it is so small and I need a bigger calendar. I try to make a solution which manages working shifts and builds duty roster. Every employee has days when they want to be on duty and when definitely not. It is always a huge task to make next months duty roster when you have abt 100 employees and 5 positions which have to be manned 24/7. And at the same time respect employee's wishes.
Create an account or sign in to comment