Second form on a table vs a New Table

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I'm trying to determine how to create an invoice from the information on our orders table but the two options I've thought of both have their issues.

1. Option 1: Create a second form for my orders table with only the specific information needed to create an invoice plus additional fields for exact charges (versus estimates which are found on the orders table.) When I created this second form and added the fields I needed, I was unable to "edit" the form (i.e. fill in the new information) when I clicked "edit." The page refreshed back to the main orders form instead of the invoicing form I was on. Is there a way to fix this?

2. Option 2: I created a new table for invoicing and a table relationship to the orders table referencing only the fields needed on the invoice. I then attempted to make a Report Link field to show the products from that related order (the orders table has a relationship with the products table; many products to one order) but after creating the field relationship (matching the order # from the orders table to the order # on the product table) the embedded report still showed up blank. ("No products found.") Am I linking this field incorrectly?

Our products are purchased from an outside manufacturer and brought into our inventory. On the orders table we "add products" and within the product table we "add an inventory adjustment" to show the actual quantity and weight purchased into inventory. Once we sell these products to a customer we "add an inventory adjustment" from the orders table to select the item, quantity, and weight we want to sell from our inventory. The purpose of the invoice form or table would be to access the products related to that order and enter the inventory adjustment as either a purchase or a sale.

I am also open to an Option # 3 if you have an alternate suggestion. I tend to overthink this and make it way more complicated than it needs to be. Thank you.

Photo of Andrea

Andrea

  • 90 Points 75 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
Either if your two methods can work well.

In the first method you would need to make a button to Edit Invoice. That would edit the record on a firm you specify.  For example

Urlroot() &"db/" & dbid() & "a=er&dfid=10&rid=" & totext([Record ID#)

The dfid=10 (think Da Form ID) tells it to use form # 10. You can see Da Form ID in the URL when you are editing or previewing the form.

Same approach to view the record on alternative form.

Urlroot() &"db/" & dbid() & "a=dr&dfid=10&rid=" & totext([Record ID#)

The a=dr says that the action is to Display Record instead of action = Edit Record.

Note that you can make a report call Invoice view and then in Forms Usage you can set that Report to always use the Invoice Form when Viewing or Editing records. In that case, you may also want to make an opposite button to View on the Orders Form.

Urlroot() &"db/" & dbid() & "a=dr&dfid=2&rid=" & totext([Record ID#)

Note also that you can make a button to Print on a particular for by mimicking the URL you see when you use the More ... print button.

Urlroot() &"db/" & dbid() & "a=printr&dfid=10&rid=" & totext([Record ID#)
Photo of Andrea

Andrea

  • 90 Points 75 badge 2x thumb
Perfect, thank you! All I needed to do was change my "dr" to "er" and now it's working like I wanted. Thanks again.
Photo of Andrea

Andrea

  • 90 Points 75 badge 2x thumb
Also, is there a way to stay on this invoicing form once saving? When I save it I am automatically taken back to the orders form (which in most cases is desirable) but in this case I'd like to stay on the Invoices Form so I can then review and print the invoice.