Newbies joravist Posted January 26, 2007 Newbies Posted January 26, 2007 Hi, I am trying to bring order to portal. Order id and quantity. There can be one to many order for one customer. I can not make a script that brings ordes from a file to filemaker 7. Example order item_id quantity 2011 3 2013 7 . . Number of items can be 1 to many in one order. Can anyone help, please. Thank you. Janne
LaRetta Posted January 26, 2007 Posted January 26, 2007 Hi Janne, welcome to FM Forums! We will need more information to assist you properly and here are some considerations: You mention 'other file'. You can create a File Reference to this other file (Orders?) and then place an occurrence of it in your graph (in file containing Customers) so all your work is done in the one file where Customers resides. We need to know how many files or tables are involved and their names. Do you understand the concept of joining your CustomerID in your Customers table with the CustomerID in your Orders table/file? Do you even HAVE a CustomerID in your orders file? I would assume so but I've been surprised before. It sounds like you have no Order table. You said Orders but you displayed ItemID (which is a LineItems table where there can be many Items to one Order). Do you want the Customer's Orders displayed or their LineItems? Once we understand your setup, a portal will be used to display the Customer's Orders (or LineItems) on the Customer layout in a portal list. If you understand all of this but wish to display WHAT a customer ordered (LineItems) then we can do that too. You don't need a CustomerID in your LineItems file. Once your Orders (and LineItems) are pulled into your graph; once your Orders are linked to Customers on CustomerID; once your LineItems are linked to Orders on OrderID, then you would simply place a portal based upon the LineItems occurrence directly onto the customer layout. So provide additional information and we'll help you further. There are many wonderful people here to assist. LaRetta
Newbies joravist Posted January 28, 2007 Author Newbies Posted January 28, 2007 Hello, thank you for your answere. I try to explain the case. We have a perfectly working system, which we use. Normally customer calls and orders a few products, which we have in our database. The system opens whith customer number a page, where all the required customer related information is displayed. In the page there is also a portal. In first field of the portal row I choose the product form a list, which opens when I point at the field . Each product has a product_id number and name. Second field is product name, which comes there, when the number is chosen. Next field is quantity, which I choose from 1 to 10. In the next fields are price, tax etc. calculated. We are developig our system further so that our customers can make orders in a webpage. The web system sends the order to filemaker in a text file, which filemaker imports. The file includes customer id number. That is no problem. When the customer id number is imported, filemaker finds all the cutomer information. All this is fine. What is the problem, is that I can not write a script, which brings the order into the portal. I can bring one order to the first line, but what next? When there are more than one, how does the next order go to the second line in the portal? Thank you so much for help all you wonderful people. Janne
Newbies joravist Posted February 1, 2007 Author Newbies Posted February 1, 2007 Okei, it seems that it is not possible to write a script, that simply brings data to portal rows. Or I can not just describe the problem clearly enough. One way that I have tested is to import data to several fields, name them: product1 product2 product3 and try to copy these to the existing portal. Using: Copy Paste Go to portal row What is the sequence of these and what option do I need for "Go to portal row", forst, next, last, previous? I just can not make it work. Thank you, Janne
Inky Phil Posted February 1, 2007 Posted February 1, 2007 Hi Janne I think that you might be going at this from the wrong angle. In the main portals are a tool for display purposes, allowing the user to view and change data in a related file. When scripting the addition of records there are more straightforward ways other than using the portal. Rather than trying to input data into a portal it will be a lot simpler to input your data into the related file directly and then it will show up in your portal. This can be done in the background by use of the 'freeze window' script step which will allow you to switch to an appropriate layout where you can add your new records/data without this process being seen. I would also suggest that you look up the 'set field' script step as this is a much more flexible tool than the copy and paste that you appear to be using Hope that helps Phil
LaRetta Posted February 1, 2007 Posted February 1, 2007 Hi Janne, I had not seen your prior response. The web system sends the order to filemaker in a text file, which filemaker imports. The file includes customer id number. That is no problem. When the customer id number is imported, filemaker finds all the cutomer information. All this is fine. That is the problem, is that I can not write a script, which brings the order into the portal. I can bring one order to the first line, but what next? When there are more than one, how does the next order go to the second line in the portal? Does not the web system provide the Customer with an Order Number? We really would need to know how you are currently structured (a clone of your file would help) and also a sample of text lines which are imported. A customer can have many orders. Each order can have many LineItems on it. This is a piece you are missing (which I mentioned above). It sounds like you need to possibly create your own order then import directly into your LineItems table (using this new order number to group your items together) but we really couldn't advise without seeing your existing process. What Phil suggests is true but you're still missing an important piece - the Order itself (which probably contains info such as Ship Method, Ship Address, Ship charge etc. Hi, Phil! LaRetta
Newbies joravist Posted February 1, 2007 Author Newbies Posted February 1, 2007 Hi Phil This was very helpfull. 'set field' was the key. Now I can make it work. Thank you very much. Janne
Recommended Posts
This topic is 6506 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