From Dwayne Wright PMP
Certified FileMaker Developer
Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit or other formatting of the posting may fail. For the best experience, please visit the journal directly by clicking (here).
A READER ASKS
Hi, I am currently running a scrap yard which buys metal based on their current market value. I was looking into a way to make invoicing/record keeping better and stumbled upon FM. I have been trying to learn as much as I can on my free time, however it is proving to be more complicated then I thought. I have one main issue. I am looking for a way in which I can keep record of day to day prices so I have the option to look back on a price at a certain date but use only the current price in the invoice. Again, I have only been using FM for 2 months now in my free time (not much). I was wondering if you can point me into the right direction for my situation. Any advice would be greatly appreciated.
In traditional FileMaker fashion, there are probably a dozen different ways to go about this and I’ll share with you my gut instinct first impression.
I would look to implement a way to load new prices and archive the old ones with a timestamp attribute riding shotgun. When you archive the older prices, you have at least two choices.
ADDING THE ARCHIVE INFORMATION TO THE TOP OF A TEXT FIELD
Using this technique, you set a text field equal to itself with the additional value on top or bottom (depending on which you prefer).
Bottom: Set ( text field) ( itself & the data you want in the field)
Top: Set ( text field) ( the data you want in the field & itself)
This will archive the data for you and you can see it for reference.
ADDING THE ARCHIVE INFORMATION TO A RELATED TABLE
This is the route I would take personally for a number of reasons but primarily because it would be better suited to reporting trends. There are a number of ways to go about this and a quick search on the web will find many. Considering you are a new user, you might want to default to a technique of setting up a relationship to automatically add new records and put an edit button to allow you to update prices.
I’ve reposted some of my early blog entries about this (and these are more fundamental techniques) in the the FileMaker Thoughts area. A more sophisticated technique would be using a script trigger on the price field that calls an archive script whenever new data is entered into the field.
© 2011 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.