Sundry tips - Responses to Community Questions

icon picker
Add a counter

One often needs to keep a counter to provide for example a document number. One way to add a counter to a table is shown below.
It is a two step process. First create a button to increase a counter in the table tabCounterSalesInv by one. Create a second button, that will add a new row to the table with the counter. Finally, in the table that you want to have a serial number create a button that will push the aforementioned two button in sequence. (This was before I learned about the runactions() formula ....)
Please see an example implemented below,
The blue buttons and the counter table can be hidden from the user views.
tabSalesInvoices
0
colSalesInvNumber
colCustomer
Amount
butNewSalesInv
butAdd new row
1
100000
Customer 1
44.00
Add New Sales Invoice
Add new row
2
100001
Customer 2
33.33
Add New Sales Invoice
Add new row
3
100002
Add New Sales Invoice
Add new row
4
100003
Add New Sales Invoice
Add new row
5
100004
New Cust
56.67
Add New Sales Invoice
Add new row
There are no rows in this table
tabCounterSalesInv
0
colNumber
colNrObject
1
100004
SalesInvoice
There are no rows in this table
Increase Sales Invoice Nr

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.