Develop Posted March 13, 2007 Posted March 13, 2007 I'm trying to do something very simple: In an invoice, I choose a Product ID from a drop-down list based on another table, and would like the Product Description from that other table to appear automatically for that product, on the same line. Using a Lookup function I was able to set this up correctly. When I add repetitions, however, to be able to list several products on the invoice, the process breaks down and the Product Description does NOT appear. Why is adding repetitions not working in this case? Is there an alternative way to list several products on one invoice? Thank you for your help.
bcooney Posted March 13, 2007 Posted March 13, 2007 Review how to use portals. You need 4 tables: Customer, Invoice, InvoiceLineItems and Products. Create a portal on the Invoice Layout to InvoiceLineItems related by InvoiceID. Don't use repetitions, but rather a portal with as many rows as will fit on your Invoice data entry layout. Enter the Product key into an InvoiceLineItem record in the portal and use the Lookup function to copy the Price, and Desc. Print invoices from a layout based on the InvoiceLineItems table.
Develop Posted March 13, 2007 Author Posted March 13, 2007 I have been told to stay away from repetitions but thought I'd try anyway. I was under the impression that portals are used only to view data, not for entry. I'll try your advice and let you know whether it works. Thanks a million for taking the time to respond.
bcooney Posted March 13, 2007 Posted March 13, 2007 Portals can be used for entry if you have "Allow creation of records" checked in the relationship dialog. Yes, it's much nicer to give the user a "New Line Item" button with a custom dialog, rather than having them type in the portal, but it's not necessary.
Develop Posted March 14, 2007 Author Posted March 14, 2007 (edited) For some reason, the portal only allows me to enter one record. What am I missing? Edited March 14, 2007 by Guest
bcooney Posted March 14, 2007 Posted March 14, 2007 Take a look at this quick and dirty example. btw, what version of FM are you using? InvoiceSample.fp7.zip
Develop Posted March 14, 2007 Author Posted March 14, 2007 You da man. Thank you for the sample DB. I'll study it and figure things out. I'm using 8.5 Advanced.
rblloyd Posted March 14, 2007 Posted March 14, 2007 I have the very same problem, I am using a relationship to pull pricing information into the order form, but the repetitions are not functioning correctly. Maybe you wouldn't mind looking at my file to gain a better understanding.. Thanks a ton backup.zip
mr_vodka Posted March 14, 2007 Posted March 14, 2007 Drop the repeating fields and move to a relational model. Invoice/LineItem/products. YOu will be limited with repeating fields.
rblloyd Posted March 15, 2007 Posted March 15, 2007 I understand the concept of the portal, but Im not sure how I go about placing it in my forum. Could you help me out? Thanks for everything!
Develop Posted March 15, 2007 Author Posted March 15, 2007 It's easy to place a portal on your form. In Layout mode, choose "Portal" from the "Insert" menu, then follow the dialog box.
Develop Posted March 15, 2007 Author Posted March 15, 2007 I have set up a portal that allows entry of line items into the invoice forms. However, when I delete an item from the portal, it does not delete it in the Line Items table, even though I have set up the relation to allow record deletion. Any ideas? Thanks.
mr_vodka Posted March 15, 2007 Posted March 15, 2007 How are you deleting the item from the portal exactly? are you using a script step?
bcooney Posted March 15, 2007 Posted March 15, 2007 How are you deleting the line items record? I typically put a "Delete" button on the portal row that does a Delete Portal Row script step.
Recommended Posts
This topic is 6521 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