Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/b5a9b71d9e0a7127bd8474e65ac24a66 to your computer and use it in GitHub Desktop.
Save trycf/b5a9b71d9e0a7127bd8474e65ac24a66 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfif true>
<cfset latestClubId = 'LYC000001'>
<cfset numericPart = mid(latestClubId, 4, len(latestClubId) - 3)>
<cfset newNumericPart = NumberFormat((numericPart + 1), "000000")>
<cfset newClubId = "LYC#newNumericPart#">
<cfoutput>
#newClubId#
</cfoutput>
<cfelse>
<cfset newClubId = "LYC000001">
<cfoutput>
#newClubId#
</cfoutput>
</cfif>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment