Brian Dunning's FileMaker Custom Functions

NextLetter ( MyNum )

Increments letter sequence A - Z.

  Average rating: 4.3 (35 votes) Log in to vote

Steve Gerow   Steve Gerow
Abrazos Data Consulting, Inc.
http://www.abrazosdata.com

Share on Facebook Share on Twitter

  Sample input:
NextLetter ( WorkOrderID )
  Sample output:
1101, 1101A, 1101B, etc.

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

For incrementing letter sequences.
I'm using it for versioning Work Order numbers, where a Change Order is a letter-increment at the end of a number increment.

 

Comments

David   David, Sydney
Mar 26, 2009
This returns just a single letter. Areent you missing that fact that it has to be jioned back onto the original number?
 
Sean   Sean, Birmingham
Nov 21, 2009
Curious why you used a Let inside a Let function instead of just using the one Let function.

Let (

[
az = "abcdefghijklmnopqrstuvwxyz";
position = Position ( az ; extracted letter ; 1 ; 1 )
];

Middle ( az ; position + 1 ; 1 )

)
 
Steve Gerow   Steve Gerow, Pasadena, CA, USA
Nov 29, 2009
Sean,
No reason. Thanks.

David,
All I needed it to do was add the next letter in sequence for modified purchase orders or invoices. I'm using a script to look at the old number, go to the last letter iteration then increment the next letter onto it.
 
Steve Gerow   Steve Gerow, Pasadena, CA, USA
Nov 29, 2009
David,
The revise incorporates the entire number, incrementing the right-hand digit alphabetically.
 
frank   frank, kigali
Aug 10, 2015
Hi Steve,

That's awesome, it works for my project too. but the issue is that when reaches 100Z the next serial number is 100 instead of 100AA?
 
Steve Gerow   Steve Gerow, Pasadena, CA, USA
Aug 10, 2015
Frank,
I've changed the description to reflect that it only does A-Z.

It would need a major rebuild to go beyond that.

Thank you for pointing this out.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.