Filemaker and syncing Databases... Your comments please.
Filemaker and syncing Databases... Your comments please.
- Subject: Filemaker and syncing Databases... Your comments please.
- From: Bernardo Hoehl <email@hidden>
- Date: Wed, 26 Oct 2005 17:53:43 -0200
Hi List,
I have this problem, and I would be very gratefull to read your comments...
One of my employees has a bank card from my small company's bank account and is in charge of buying small things such as mechanical parts and office supplies.
He draws cash using this card and pays everything in cash.
Once back to the office I built him a Filemaker database, let's call it "Expenses.fp5", that runs in his Mac (a remote Mac from mine) in which he adds in a record for each purchase.
The Database has a summary for all expenses that is compared to another summary (drafts) and the field "balance" should be zero or the ammount of money he has left in his pocket.
I would like to automate the addition of the "drafts" records.
I have already an applescript application that copies (or syncs) the remote application "Expenses.fp5" to my Mac at certain times (run by CRON), using the shell "rsync". So I allways have a copy of "Expenses.fp5" in my local Mac to take a look at.
I too, have a database for my bank account, lets call it "BankAccount.fp5", and my database imports its records from an excel file I download from my bank's Internet Banking, daily.
PROBLEM:
So, everytime my "BankAccount.fp5" is importing the data, it will identify a record that corresponds to the draft that was done with his card, and try to insert this record into "Expenses.fp5" that is stored in my employee's remote Mac.
Possible solution:
Step 1) "BankAccount.fp5" finds a draft record and writes a small file in my Mac for each record. The file contains some tabbed text like:
thedate and character tab and description and character tab value
Example:
"26.10.2005" card draft 100.00
The files are stored in ~/Library/Application Support/ ExpensesFolder/draft_at_date_26_10_2005_1.txt
Step 2) At certain times CRON is moving these record files in "ExpensesFolder", using "rsync", to "ExpensesFolder" in the remote machine, so the remote Mac has copies of these files.
"Expenses.fp5" when open runs an applescript application, called importData.app, this app read all files in "ExpensesFolder" and imports the data to "Expenses.fp5". After importing the data it writes the word "imported" into the file, so it won't be imported again.
Your comments please...
This routine looks very clumsy, and I would appreciate very much reading your comments, I guess someone could come up with a simpler solution...
Thank you!
Bernardo Höhl
Rio de Janeiro - Brazil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden