Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
var
tempCode string
newCode string
endvar
tempCode = codeNum.value
newCode = usersChoice.value ;say 'AL' for example
codeNum.value = tempCode.substr(1,4)+newCode+tempCode.subStr(6,4)
var
tempCode string
newCode string
endvar
tempCode = codeNum.value
newCode = usersChoice.value ;say 'AL' for example
codeNum.value = tempCode.substr(1,4)+newCode+tempCode.subStr(6,(tempCode.sizeEx()-5))
method whereAmI(inVar string) number
var
counter, position, nullFlag, fullSize number
endvar
position = 0
nullFlag = 0
counter = 1
if inVar = "" then return position endif
fullSize = inVar.sizeEx()
while counter <= fullSize
if upper(inVar.substr(counter,1)) = "M"
then position = counter
quitLoop
endif
counter = counter+1
endWhile
if position = fullsize
then return 9999 ; last position
else return position
endif
endMethod
var
tempCode string
newCode string
location number
endvar
tempCode = codeNum.value
location = whereAmI(tempCode)
if location = 0
then msgStop("Error","Invalid part number")
return
endif
newCode = usersChoice.value ;say 'AL' for example
if location = 9999
then codeNum.value = tempCode.subStr(1,(tempCode.sizeEx()-1))+newCode
return
endif
if location = 1
then codeNum.value = newCode+tempCode.subStr(2,(tempCode.sizeEx()-1))
else codeNum.value = tempCode.substr(1,location-1)+newCode+tempCode.subStr(location+1,(tempCode.sizeEx()-(location-1)))
endif