I have an app that I've been working on enhancing with the ability to use the Barcode Reader to read product numbers and enter them in to a text input field. I have the basics of this function working by assigning the following:
barCoilID: OnScan.Set(varCoilID, First(barCoilID.Barcodes).Value)
TextInput: Default.If(varCoilID = "", Parent.Default, varCoilID) (the text input will only accept numbers)
This works as intended however, our computer system puts a leading "s" in the barcode, which means nothing to our users. The product ID as a format of ######. I can use a Right(varCoilID, 6) in the Default property but I've found a few products that only have 5 digits. It's rare for that to happen, but I want to take as much error out of this as possible.
Does anyone know a way to just drop the "s" from the scan without using a Right Function? I've tried using a Substitute function (Substitute(varCoilID, "s", "") in both the OnScan and Default properties and it doesn't seem to work. Any ideas would be greatly appreciated.