mcbain1212 Posted August 18, 2004 Posted August 18, 2004 I am trying to write a script to alert me when a person orders more then one widget so that I can combine shipping. So far I have the script written so that it sorts all the records and marks all the duplicate ship to names. What I need to do next is figure out how to have the script combine the widget name with the persons address. It is best explained by example: Record 1: widget: widget 1 Ship to name:Dan Smith Address: 555 f st City:Folsom Zip: 95855 Record 2: widget: widget 5 Ship to name:Dan Smith Address: 555 f st City:Folsom Zip: 95855 Record 3: widget: widget 3 Ship to name:Dan Smith Address: 555 f st City:Folsom Zip: 95855 Record 4: widget: widget 1 Ship to name:Jill Smith Address: 111 D st City:Salville Zip: 92677 Record 4: widget: widget 8 Ship to name:Jill Smith Address: 111 D st City:Salville Zip: 92677 So for Dan smith I would like the database to combine item names with the persons address in a new field like this: Widget1, widget 3, widget 5 Dan Smith 555 f st Folsom 95855 Can anyone help guide me through it. I am using FMP6. Thanks for reading.
Philland Posted August 19, 2004 Posted August 19, 2004 First I would suggest that you create a unique customer number so that you have an easy way of identifying each customer regardless of similarities in names and that you maintain the customers and customer information in a separate table/database so that you can relate the orders and the customers on your shipping form. Your shipping form should also be in a separate database/table so that you an have only one shipping record for all product sent on a given shipment. The products would be displayed on the shipping form in a portal related by the customer number and a "has not shipped yet" flag. If I understand the way you've expressed this you have each order rekeying the customer information in a very flat file format. With your current structure you could try creating a concatenated field combining the customer name, street address and expected shipping date, to create a unique identifier that won't pick up previously shipped orders. Then create a self relate on the concatenated field and a portal based on that relationship to show you all orders placed by a client that will ship on a given date. Hope this at least gives you a place to start. Phil
Ender Posted August 19, 2004 Posted August 19, 2004 Yes, you would do well to develop a relational structure for your data. Not only will it save you shipping labels, it will save your users data entry time.
Recommended Posts
This topic is 7404 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 accountSign in
Already have an account? Sign in here.
Sign In Now