0

add records automatically

I have a database with three tables. One is orders and line items, other shipments and shipping lines and one with invoices. It may be the case that a shipment does not contain all the lines of the order, which is why I have separated it. However, I want to generate an invoice per shipment, with all the lines sent. I have linked the table of shipping lines with the invoices (N: 1) but I have to select all the lines sent to make the invoice. Can you do that automatically? Thank you. Antonio

4 replies

null
    • Birger_H
    • 6 yrs ago
    • Reported - view

    If you could send me ( support@ninoxdb.de ) a copy of the Ninox database you are working on (Main menu -> "Save Archvie as...") I'm sure that I can find a solution to your problem.

    Birger

    • Walcher_Messebau_GmbH
    • 4 yrs ago
    • Reported - view

    I have the same problem. Can someone help? I need to have the same filtered results from a table in more records. Otherwise I have to select each one manually in every record

    • Antonio
    • 4 yrs ago
    • Reported - view

    Hi!

    Let's see if I can help.

    For example:

    Table "Articles"
    Table "Orders"
    Table "Order lines"
    Table "Invoices"
    Table "Invoice lines"

    You create an "order" by creating line item (Order lines) per item.

    In the order record you create a button with the following code:

    let myOrder: = this;
    let myIn: = create (Invoices);
    for i in select ('Order Lines' where Order = myOrder) do
    myIn.'Invoice lines': = i
    end

     

    You have to adjust this to your fields.

    It is an idea so you can work. If you need more or more specific help, don't hesitate to ask.
     

    • Walcher_Messebau_GmbH
    • 4 yrs ago
    • Reported - view

    Wait wait..
    What exactly do you mean with "order"? If you are Italian we can speak in Italian. Anyway..I have this table which is a database of all employees. Since we take care of trade fair set up, I created a database with all the events called "Events". In each event I have to generate a documentation to print, in which there are all the employees divided by category, i.e. employees, artisans, external companies and if they are still working for or with us, otherwise they don't appear. In this case, I created three tables referring to the "staff" with different filters to divide them and make them appear in the print. Actually, I have already done all this but my problem is that for every single event I have to select every single employee manually in the reference table. As I understand from your comment, you can import the staff through a function associated with a button. This would be fine but I didn't understand the formula well.

    Thanks for your help

    Schermata 2020-07-28 alle 08.47.45

Content aside

  • 4 yrs agoLast active
  • 4Replies
  • 2044Views