The simple answer is to go into the Invoices Starter Solution and dissect that. Basically, an Invoice layout would have a portal for line items, connected by a relationship which allows creations of records on the line item table (portal).
I totally get the idea of how "many to many" need to be avoided and all that.
Better look at that concept again, many to many relationship are a standard part of relational database design and I see one such many to many relationship in your relationship graph.
As you'll find in the invoices starter solution, a many to many relationship where LineItems is the join table between invoices and products and a portal to LineItems is used to enter data in the most typical layouts set up for this task. (In the starter solution, "LineItems" is called "InvoiceData".)
I've tried to dissect the Invoices Solution but it is just too full of concepts still over my head. I'm 100% new to databases.
When I say "avoid" many to many relationships, what I mean is to use intermediary tables to create the connections. In this case, LineItems. But I have not been able to make it work.
I create a portal and then don't know how to create a new LineItem from there. If I create a line item on the intermediary table, it shows on the correspondent PO. This means the link is working, but How do I create the lines from within the PO Layout? Am I supposed to create the LineItems from a different Layout? I know its such a simple concept. I'd appreciate a step by step list so I can see where I'm messing up.
Do you know how to set up a portal to the line items table for data entry?
Did you enable "allow creation of records via this relationship" for the line items table in the relationship linking the Purchase Order table to your line items table? (Double click the relationship line)
I did create a portal, I just don't know if there is any special step for "data entry"
I did set up a portal and I did enable "allow creation of records via his relationship".
There is no such special "data entry" setting. Any portal will allow you to directly edit data in the portal's records unless you specifically prevent it. Only portals with "allow creation" allow you to enter data into the bottom "add row" of the portal and automatically create a new related record. (But many developers prefer to put a button on the layout that is used to add new records to a portal via a script.)
So the question remains as to why this isn't working for you. Next step is to look at your layout design. On what table occurrence is your layout based? on which table occurrence is your portal based? A table occurrence is what we call the "boxes" in your relationship chart. Layout Setup | Show Records from specifies the Table Occurrence that serves as the context for your layout. Portal Setup | Show Recorsd From shows the table occurrence context for your portal. If you select the wrong table occurrence in either place, this might produce problems for your portal. Likewise, the fields inside the portal row almost always are fields from the same table occurrence as the portal (they can also be global fields from any table and fields from a table occurrence related to the portal's TO.)
I created a new portal again (not the second but the tenth maybe) and it worked. I don't know exactly why it worked this time. The only different thing I did this time was to include in the portal the PurchaseOrderID field and it let me do it. I deleted that field later and it still worked. The Layout where I created the portal was based on the PurchaseOrder Table and I have only one table occurrence per table (so far). I'm attaching a screenshot where you can see the Tables and the portal config. Like I said it is working now but let me know if you see anything out of order. I then attached another image where you can see the portal that didn't work and the one that did. Only difference is that in the second one I include PurchaseOrderID and PODate field which I later deleted with no problem.
Thank you so much for your time. I took the course for FM13 on Lynda.com but I'd really appreciate if any of you can recommend any other source for training since this is only the beginning of a larger project. Thanks again.
Here you can se the two portals. The one that worked (bottom) and the one that didn't (top)
Hmmm, actually, I don't see any portal at all in that screen shot, perhaps due to very tight cropping of the image...
And the previous combined image shows your layout in table view--and portals cannot be seen or used in table view...
The portal is the line that says "QTY, Item Description and Item Number" in the top right window with the title "Purchase Order Details". The Item info in that line is taken from a separate Product Table. The portal has only one line for now, because customers are ordering only one item per PO but that is going to change later. The windows you see in the top left corner is actually the "LineItem" Table but I called it PURCHASE_PRODUCT since it links Tables "PURCHASE_ORDER" and "PRODUCT".
Thank you PhilModJunk for all your help.
Now I'm only having trouble with one thing. We receive POs in PDF files. We copy+paste the info into the fields but it comes with all sorts of fonts, bold and italics. Is there a way to configure fields to override text format? Thanks again.
As I thought, too tightly cropped to really see much about those portals.
Set up this auto-enter calculation on any field where the user might paste text:
TextFormatRemove ( self )
and then clear the "do not replace existing value..." check box.
Thank you PhilModJunk!. Will try tomorrow.