Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6401 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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

Posted

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.

Posted

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

This topic is 6401 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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