May 16, 200718 yr I have a layout with the “Save records change automatically” unselected. So when the user creates a new record or makes changes to an existing one a dialog box appears. I am wondering if there is a way to piggy back a script on this save action to get FM to run my script at the same time the record is saved. The other alternative I can think of is (if possible) to totally disable the FM built-in save action in order to force the user to clik on my Save button (which would include my script). If this is possible how can I disable the automatic save in FM? Any suggestion on how I can run a script each time a record is saved/changed will be very much appreciated.
May 17, 200718 yr Any suggestion on how I can run a script each time a record is saved/changed will be very much appreciated. Yes rely on calc'fields instead - Perhaps the key to problem in fact is relational, in what the scripting is supposed to do - Remember that filemaker can create a many2many structure simply with a CF or a repeating field, as long as summary reports not is urgent to make in the missing join table. Pure and simple copying data so it get's redundant is neither a justified desire. Similar could the generation of dedicated records often be avoided by rethinking the approach in this direction: http://www.fmcollective.com/2007/04/just_add_the_ta.html --sd
May 17, 200718 yr Author I Soren: Thanks for replying. The underlying task is that I am trying to complete an accounting system. By reading your previous posts I can tell you are proficient in accounting systems. You can probably put me in the right track. I already have a general ledger, Invoicing (with Invoice-Invoice line items), Billing from suppliers (Bill-Bill Line items), Payments, etc…. As you know all these transactions need to be dumped in one table (merging table) for reporting purposes. I thought I would have a script to copy each transaction to the merging table. Hence the need to trigger the script every time a new transaction is created (be it in general ledger or invoice or billing). From a db point of view a parent-child structure is how it should be. But from an accounting point of view it is a real headache, the debits reside in a parent table, the credits in a child table or vice versa. The challenge is how to dynamically gather all these transactions from these parent-child tables in one spot. You suggestions will be highly appreciated.
May 18, 200718 yr By reading your previous posts I can tell you are proficient in accounting systems No not really, booking/CRM are what have been doing mostly! But perhaps just enough to know that this: As you know all these transactions need to be dumped in one table (merging table) for reporting purposes ...is wrong, you should use the ledger for this! Think about it - the foreignkeys are pretty good breakers for the reporting! --sd
May 18, 200718 yr Author Ok, thanks Soren for the suggestion. I'll experiment with it and see how it goes.
Create an account or sign in to comment