1 of 1 people found this helpful
Use an ellipsis to find a range, i.e. 0020...0040. In your script, you can set field [ Home::ID ; $StartID & "..." & $EndID ]
You may find this helpful: FileMaker Power Finds | Extensitech
Incidentally, if you haven't already, you may also want to learn the Case function, rather than nested If functions.
Finally, and also incidentally, if you have FMP Advanced, you can use the following custom function to create fixed-width text strings, it accepts original text (or number), the number of characters you want, and the fill character you want to use ("0"). If you enter a negative number in numCharacters, it fills left, for positive it fills right.
//x_txt_fill ( text ; numCharacters ; fillCharacter ) =
Let ( [
text = Left ( text ; Abs ( numcharacters ) )
; paddedtext =
numCharacters > 0
; text & fillCharacter
; numCharacters < 0
; fillCharacter & text
; missingCharacters = Abs ( numCharacters ) - Length ( text )
missingCharacters = 0
; x_txt_fill ( paddedtext ; numCharacters ; fillCharacter )