TOPIC: How to get a new Value?
#1004
How to get a new Value? 2 Years, 11 Months ago
I Was previously troubled by fatal errors due to corruption in my o.s.
anyway now i am happily learing how to work in suneido with manuals & libs.
I am trying to develope a small program for invoice printing,for that i
need an invoice number field which always shows new value.I tried a lot
but in vain.Timestamp() is a good thing but doesnt fulfil my requirement.
please help.
 
 
#1007
Re:How to get a new Value? 2 Years, 11 Months ago
Create a rule for your field like:

Code:

Rule_myfield

function ()
    {
    return GetNextNumber('nextnumtable', 'nextnumfield')
    }



You will need to create the table, e.g. from QueryView:

create nextnumtable (nextnumfield) key()

(An empty key means the table can only have one record.)

Hope that helps.
 
 
andrew