Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counter expression needed in lookup

Status
Not open for further replies.

Jonesxx

Technical User
Jul 14, 2004
71
GB
Hello

I am trying to enter a counter expression as a lookup in GoldMine V 6.7. I have an invoice number field in GoldMine and I would like this field to be auto-populated when the entry in the lookup is clicked on.

I would like to start on number 00001, then 00002, then 00003............000010, 000011 etc, I am currently using the expression ~COUNTER("ID",0001)which displays the number 1 in the invoice number field, however the 0000 section of the number is excluded.

Can somebody please advise.

Cheers!
 
You can do this with the PADL function.

PADL("Test", 8, "x")

Returns xxxxTEST so you'd want something like

padl(ltrim(str(counter("A", 1,1))), 8, "0")



---
Chad Smith
michad76@gmail.com

Check out the GoldMine Blog at
MCP - Microsoft SQL Server
Crystal Reports Certified Professional
GoldMine Certified Professional
Microsoft CRM Certified Professional
 
Thank you for the expression it worked, also thanks for the link to the gmblog, very useful.

Jones
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top