[Solved] VariableFirst/LastNumber not working

I created a function to retrieve the first and last digits of a variable, but it’s not working. I tried it with both a child variable and a default variable, but nothing happens

Those expressions are for arrays. They get the first and last element or index of an array.

To get the first and last character of a string you can use the get a character from text which oddly becomes StrAt(). If the variable type was a number than you would need to use ToString() to convert it to a string.

String positions are like arrays. The first position is 0 and the last position is the string length minus 1. In my example if the text was “train” it would return tn

This would be for numbers. Although, a formula could be quicker. IDK. It depends.

This is an example. If I was using this then I’d covert the number to a string just once and use that.

2 Likes

Oh I see, thank you so much

1 Like