print Ordered
i have:
if text(InvoiceItemVendor.'Status Item') = "Ordered" then
printRecord(this, "Ordered")
end
but it doesn't work
9 replies
-
I have two table: invoice and InvoiceItemVendor
in InvoiceItemVendor i have one choice field. there is "ordered" and "Pending" and etc.
for example in invoiceItemVendor is 20 items but my customer choice 10 items for order then i choice "ordered" in choice field. i want make one report that show me "ordered" only. how can do it?
-
There may be other ways to do this but I've made an example with a sort of staging table 'Print Que' where you copy the desired records to and use this for printing out.And also a view where you can see the result in advance(a view is still not printable with ninox)
In this example (based on the Ninox Template Invoices) I've created an extra choice field in the Line items of the Invoice Items table and an extra tab (Printing) with also a choice field with the same options in the same order.
Example downloadable here: https://www.dropbox.com/s/hrgow3h9je5frlm/Enhanced_Invoices.ninox?dl=0
Steven.
-
Excellent!
That's exactly what I wanted
thank you Steven.
-
De nada.
-
I noticed a problem after testing. for example I have one Invoice with some items that they are from 1 to 6 item number. i make 3 choice with "Ordered" (for example make items 2,4 and 6 for ordered) and then button about 'Print Que' . in table of print que show me 3 items that are with "ordered" but Item No is 2 , 4 , 6. i want Item no create a row number. (be 1,2,3,...)
How do I create a row number?
-
Hi,
Try this code in the button, is this what you're looking for? :
delete (select 'Print Que');
let curRec := this;
let s := 'Item Status';
let k := (select 'Invoice Items' where Invoice = curRec and 'Status Item' = s);
let c := 0;
for i in k do
c := c + 1;
let p := (create 'Print Que');
p.(Invoice := i.Invoice);
p.(Item := i.Item);
p.(Qty := i.Qty);
p.(Price := i.Price);
p.(Total := i.Total);
p.('Item No' := c)
endSteven.
-
good , worked thank you.
is there formula for trigger?
-
Maybe in the trigger after update of the Item Status choice field. But personaly i would prefer a button.
-
thank you
Content aside
- 2 yrs agoLast active
- 9Replies
- 2155Views