May 20, 200718 yr Hello, I'm having trouble wrapping my head around how I need to structure my relationships. I trying to do the following. Database users will enter workorders into the WORKORDERS table for clients from the CLIENTS table each workorder has multiple service line items. After multiple workorder records are complete for a client I would like the database user to be able to goto an INVOICE table and select a clients name then in a portal below they would choose from a drop down list that was populated with that clients related workorders. I am very new at this and if any further information is needed please ask. I've also included a copy of what I have thus far. Jason PServers.fp7.zip
May 20, 200718 yr The way I see it, you're not really adding a WO to a new Invoice Line Item table. You're marking the existing WO as belonging to an Invoice, by puttin the Invoice ID into the WO record. The WO table is functioning as a "potential" Invoice line item. A WO can belong to 1 and only 1 Invoice; correct? If so, it is a major structural difference from creating a "new" Invoice line item record. So what you need is not a way to drop-down a list in a portal, which would imply creating a new record, but a way to choose from existing WO's, marking them as belonging to this Invoice. They would then appear in a portal of this Invoice's WOs. Alternatively you could use a "free-floating" drop-down list. But, it would need either a button to set the choice into the Invoice's portal, but that's a little clunky. Or use a free "event trigger" plug-in to run a script to do what I'm doing with the portal script. PServers_fej.fp7.zip
May 21, 200718 yr Author Yes a workorder can belong to only one invoice. Thanks for the the help. Also do you have any good tutorials/books you can recommend that have to do with relationships?
Create an account or sign in to comment