Simone
06/29/2023, 4:20 PMmrtom
06/29/2023, 4:26 PMAdam Cameron
Simone
06/29/2023, 4:28 PMSimone
06/29/2023, 4:28 PMSimone
06/29/2023, 4:28 PMAdam Cameron
Simone
06/29/2023, 4:29 PMAdam Cameron
Simone
06/29/2023, 4:29 PMSimone
06/29/2023, 4:29 PMMichael Schmidt
06/29/2023, 4:29 PMAdam Cameron
Adam Cameron
Michael Schmidt
06/29/2023, 4:30 PMSimone
06/29/2023, 4:30 PMSimone
06/29/2023, 4:30 PMAdam Cameron
mrtom
06/29/2023, 4:37 PMSimone
06/29/2023, 4:44 PMaliaspooryorik
myquery.currentrow
, which is literally the index of the row. But as others have said you have not really explained the problem.mrtom
06/29/2023, 4:45 PMmrtom
06/29/2023, 4:46 PM<cfscript>
var input = "51A"; // try 51 or 51A
var position = REFind("[A-Za-z]", input, 1, true); // find the first position of any letter
if (position.len[1] > 0) { // if a letter was found
var numberPart = Left(input, position.pos[1] - 1); // get the number part
var stringPart = Mid(input, position.pos[1], Len(input)); // get the string part
if (Len(stringPart) > 0) {
var lastChar = Right(stringPart, 1);
var newChar = chr(asc(lastChar) + 1);
}
WriteOutput("Incremented value: " & numberPart&newChar);
} else {
input++;
WriteOutput("Incremented value: " & input);
}
</cfscript>
you can toy around with this in trycf.comSimone
06/29/2023, 4:52 PMSimone
06/29/2023, 4:52 PMbkbk
06/30/2023, 1:08 PMMonte Chan
07/01/2023, 6:34 PM