AnsweredAssumed Answered

Using middle () to trim fed ex tracking number

Question asked by rmaltsberger on Apr 4, 2011
Latest reply on Oct 18, 2018 by philmodjunk


Using middle () to trim fed ex tracking number


I'd like to trim the number given when I scan a FedEx barcode from the scanned 32 digits down to the trackable 12.  The 12 digits being on the 17th number, thus I'll use (doesn't @ = one numerical digit?)


I also want to base the trim upon whether or not another field is set on a value.  I don't want to trim USPS numbers, so, I only want to trim a 32 digit value when my category field is set to FedEx.

So upon modification of my category, I'll run a script that

If [database2::category="FedEx"]

go to field [database2::serial number]

if [database2::serial number="@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"]

set field [database2::serial number=middle("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@";17;12)

end if

end if

Or how should this work?!