jtwilber Posted May 21, 2003 Posted May 21, 2003 Need to start in Ordermain.db5 and have button that will take info from here and create a new customer record and customer# in Customer.db5. : I'm experimenting but can not quite get it to work.
pvivacqua Posted May 21, 2003 Posted May 21, 2003 The easiest way to do it would be by starting out from the customer file after having registered the customer. this way you can create a relationship between your order file and your customer file where customer#=customer#. By pressing the button on the customer file, it would copy the customer# from the customer file, go to the order file, create a new record, paste the customer# from customer file into your order file. This way you could get the data from any record on the related customer file.
Ugo DI LUCA Posted May 21, 2003 Posted May 21, 2003 Hi, Yes Privacqua is right, you should do it within the Customer File, although the "copy/paste" method should be replaced by a "Set Field". In order to limit the risk for duplicate records in the related file, script the new record using global fields in the Main with a "check dupes" calculation referenced to the Customer file. You would need a constant relationship from Order To Main, and another from Main to Order. When the Customer_ID is created, the script in the related file would set a global field g_Customer_ID to the value of this new Customer_ID. A script in the Main would then Set the Customer_ID to the value of that global field using a Set Field (Customer_ID, your contant rel::g_Customer_ID)
danjacoby Posted May 21, 2003 Posted May 21, 2003 Wait a minute! I'm reading your original post, and it seems to me that something is backwards. If I understand, you have orders in Ordermain, and each order is for a particular customer, the list of customers being in Customer. Which means that every time you create an order, you enter a customer from the list. Also, if I am right, any items in the order are irrelevant to this thread; only the customer info is relevant. Pushing forward, a simple button that runs an external script (in Customer -- that creates a new record and, if necessary, auto-enters any info such as Customer#) is all you need. Once the new customer is entered, it should be available to Ordermain. Or are things more complicated than they seem?
jtwilber Posted May 21, 2003 Author Posted May 21, 2003 Well, it the system is for a party rental company. The phone rings and customer starts inquiring about equip. We want to start an order on the phone as an inquirey without having to "setup" a customer file. Once the order form is filled out we may or may not want to make this person an official customer... ie by end of order customer says OH your are in Plymouth MASSACHUSETTS, I thought it was Plymouth OHIO... never mind. The good customer we do the order by phone then at hang up click "Create Customer file". :
Ugo DI LUCA Posted May 21, 2003 Posted May 21, 2003 OK, So just drop a global field for tha Customer Name on the layout, and create the "Quote" for this PROSPECT. You may even not need any other fields at the start. At the end, if the Prospect is a future customer, create a new customer record using this global. You surely won't hang up before compiling the customer record ! Using the global, the script will Step 1 : Check for duplicate record If is valid (Relationship to Name::Record_ID) Go to Layout "Duplicates in Portal" Halt script ----(You will end with a list of possible duplicates, click in a row to select existing name already entered or use another button on layout that will go to next step of this script)--- Else Perform External script - Create a new Customer Perform External script - Set field (customer_Name, Constant::g_Name) Perform External script - Refresh step You will end in the Customer File to enter the records there.
jtwilber Posted May 21, 2003 Author Posted May 21, 2003 ooooo ugo you tha MAN! (or woman?) I'm gonna try this, being a novice makes it sticky but i'll figure it out. By the way would the book "sriptology" be of benifit to me on some of this stuff. All I have is Schwartz bible (and holy Bible)... sometimes the latter is more helpful in my moments of frustration! Thanks again. Jonathan
broberts7usa Posted May 21, 2003 Posted May 21, 2003 Ugo is definitely a man. Jonathan, there are some other relevant threads (I should know, I started many of them, trying to learn, like you). Check below (pretty recently) in the list of threads. Scriptology is a good investment but Osborne's site (he's the author - www.databasepros.com) is a goldmine too.
Ugo DI LUCA Posted May 22, 2003 Posted May 22, 2003 Why a woman would have a helmet ? Well, I always keep it when my wife's driving Advanced FileMaker Pro 5.5 Techniques For Developper from Moyers and Boyers is a very good book to start with IMO.
cjaeger Posted May 22, 2003 Posted May 22, 2003 >Well, I always keep it when my wife's driving I like this french chauvinism. so that's settled now.
Lee Smith Posted May 22, 2003 Posted May 22, 2003 UGO! Talking like that, you better wear it all of the time.
Recommended Posts
This topic is 7860 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