topjobs Posted January 19, 2003 Posted January 19, 2003 Hi, A client of mine wants to be able to do the following: Enter a ClientsPO and turn it into multiple VendorsPO. They receive an order from a client with several products. The products are then ordered by my client to several vendors. I have several files setup (VendorsPO, ClientsPO, Products, Vendors, LineItems) and several relationships. I can't find a way to create several VendorsPOs from the ClientsPO with the produts showing from LineItems. I get either all items from the ClientsPO (instead of just the one belonging to that Vendor) or I get only the first product. Also, is there a way to that automatically, meaning by script or scripts. Any help would be appreciate. Thank you Terry
Razumovsky Posted January 19, 2003 Posted January 19, 2003 Here is the method I use: 3 fields in VendorPO: t_VendorName t_NewVendorName n_PO# 2 fields in LineItems t_VendorName n_PO# (auto enter serial #) Relationship "NewPO" relates LineItem field t_VendorName to VendorPO field t_NewVendorName with auto create new related records checked. get your found set of all a customers items in LineItems and then run a script in LineItems that loops through the records with the following step: set field ["NewPO::t_VendorName","t_VendorName"] set field ["n_PO#","NewPO::n_PO#"] this creates a new VendorPO for all items for vendors that do not have an existing PO, and assigns these items the appropriate PO#'s so the can be viewed in a portal from VendorPO PO#::PO#. When a VendorPO is placed, you need to make sure that part of the placement script clears the field t_NewVendorName or else you will have additional items added to the PO after it has been placed. There might be a better way to do it, but this has worked reliably for me. I remember trying to work it out using replace instead of looping through, but I dont remember why it didnt work. HTH
BertBoye Posted January 20, 2003 Posted January 20, 2003 The easies way is to add the vendor name to Line_Item and then you can just make a find all orders containing
topjobs Posted January 20, 2003 Author Posted January 20, 2003 Thanks for you reply. Could you elaborate on the looping process that you describe in your reply? I am not familiar with the loop feature. Also, does you example allow me to create a VendorPO for each ClientPO? My client wants to send an order to the vendor for each order they receive from their clients. So, sometime I might need 2 or more VendorPO for each ClientPO, depending on the number of products that the client is ordering. Thanks again. Here is the method I use: get your found set of all a customers items in LineItems and then run a script in LineItems that loops through the records with the following step: set field ["NewPO::t_VendorName","t_VendorName"] set field ["n_PO#","NewPO::n_PO#"]
topjobs Posted January 20, 2003 Author Posted January 20, 2003 Thanks for your reply. What I need is create 1 or more VendorPO for each ClientPO, and not a summary of orders, since the vendors send the products directly to the clients, and therefore need to know which products goes to which clients. If you have an idea on how to do that, please let me know. Thanks again. The easies way is to add the vendor name to Line_Item and then you can just make a find all orders containing
Razumovsky Posted January 20, 2003 Posted January 20, 2003 Thanks for you reply. Could you elaborate on the looping process that you describe in your reply? Check out the script step loop/ end loop. It allows you to perform a series of actions on one record, then go to next record (exit after last) and repeat the same series. Can be very handy, and worth reading up on. Basically, it is: go to record/request first Loop *perform actions here go to record/request: next (exit after last) End Loop "Also, does you example allow me to create a VendorPO for each ClientPO?" Yes. If you start with the found set in LineItems of all products from a single clients PO, you will create X amount of Vendor PO's where X = the number of different vendors represented in the found set. This method will not produce multiple PO's for the same vendor. This can also create vendor PO's that have all the orders for one specific vendor from a group of clients. The new clients orders from the same vendor automatically get assigned to older Vendor PO's that have not been placed (a placed Vendor PO will not have anything in the t_NewVendorName field). If you only want orders form a single client for each VendorPO, you will need to script it appropriately. If you are not familiar with relationships and/or are new at scripting, Bert's suggetsion is much easier, and could suit your needs. The drawbacks are that you need to know (or calculate) all the vendors present on the ClientPO first so you can specifically search for them. The method I use can create all the VendorPO's from all the Client PO's using only the script above. There is also no extra steps involved when dealing with a Client that is ordering from a new vendor that you have not dealt with before, and no finds based on related fields that may slow down the program when large quantities of records are present. HTH Oh- just reread your reply to Bert. You do want Multiple PO's to the same Vendor, one for each client. His idea is probably the best for you, as it is simpler to execute, and it seems like you do not have need for the advantages of the loop/ set related field solution.
Ugo DI LUCA Posted January 20, 2003 Posted January 20, 2003 Not very clear if : - you want one Purchase order for any single product from one customer order, - you want one Purchase order for any range of products from Vendor X from one customer order. Also, how is your line item set ? Do you have the same line for the customer order (your client PO) and the purchase order ? Do you have one line for any operation with an ID to link the lines each-other ? Finally, Is your Purchase Order_ID created into the line item or into the Purchase Order_ID ? The solutions you search for need to fit your structure...
topjobs Posted January 20, 2003 Author Posted January 20, 2003 Thanks for all your help. I should explain exactly how business is done, so you can understand my problem better. A client calls-in, and place an order for 5 products. A ClienPO is created. In that example, product 1 & 2 is from vendor 1, products 3, 4 and 5 are from vendor 2, so I need to automatically create 2 VendorPOs, first one with vendor 1, containing product 1 & 2, and another VendorPO for vendor2, containing product 3, 4, and 5. Since each products is customize and all vendors are shipping directly to the client, one or more VendorPO has to be created for each ClientPO. Thank you very much for your time. Terry
Ugo DI LUCA Posted January 22, 2003 Posted January 22, 2003 Sorry for the late answer but your post made me look back to my own files to see if there was a better solution that the one I actually use. Here is the process now that some dudes on this forum helped me out...Thanks to them all. Well, here is the method. I find it very simple to execute after all. 1. using a self join, identify how many vendors are linked to a unique customer order. 2. if the result is 3, then your next PO# will be "Actual PO#+3" 3. use a global to store the vendor_ID in the line item and the PurchaseOrder_N
topjobs Posted January 23, 2003 Author Posted January 23, 2003 Hi Ugo, Thank you for your reply. Could you please email me a sample of the example you gave me in your reply? I am not getting it My email address is [email protected] Terry P.S. Es-tu Francais?
Ugo DI LUCA Posted January 23, 2003 Posted January 23, 2003 Here is the test file. Play with it. Simply fill your Customer Order and click on the button. This is a test file only. I just used it to see if it worked, but there are some improvments I'll made for the definitve one. 1. A pre-script to catch all orders already processed 2. A pre-script to catch all orders where products are already in stock As my definitve line item file will hold a unique id (a separate line for any operation, but a unique id to group them), Customer Order and Purchase Order wouldn't be set in the same line. Hope it will help you. My origins : Born in France, from an Italian father and a spanish mother My Father's father was Italian, but my Grandma is Austrian My mother's father was Portuguese and her mother was Italian My wife is italian borned in Switzerland from Italian father and Danish mother. All considered, I'll say I'm 90% Italian (or 100% european). Subcategorizing it will be a great calculation to deal with in a thread in the "Left Brain" section.
Recommended Posts
This topic is 8031 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