Saltar al contenido principal

Búsqueda

Búsqueda

Help for VB script needed

Comentarios

2 comentarios

  • Avatar
    Peter Thane

    I replied to something similar the other day but that was how to connect up to one of the standard Check Digit calculators so this may help part of the way

    https://support.seagullscientific.com/hc/en-us/community/posts/213172188-How-To-Create-A-Check-Digit?page=1#community_comment_1500000324601

    I am not sure if any inbuilt calculators match your requirements but if not you will need to create a custom routine.

    This is very rough and there is probably a better way of achieving this but (using a named data source as mentioned above this time called "testcode") this works

    Value = Format.NamedSubStrings("testcode").Value

    Value1 = Left(Value,1)

    Value1 = cint(Value1)

    Value2 = Left(Value,2)

    Value2 = cint(Value2)

    Value2 = Right(Value2,1)

    Value3 = Left(Value,3)

    Value3 = Right(Value3,1)

    Value3 = Cint(Value3)

    Value4 = Left(Value,4)

    Value4 = Right(Value4,1)

    Value4 = Cint(Value4)

    Value5 = Left(Value,5)

    Value5 = Right(Value5,1)

    Value5 = Cint(Value5)

    Value6 = Left(Value,6)

    Value6 = Right(Value6,1)

    Value6 = Cint(Value6)

    Value7 = Left(Value,7)

    Value7 = Right(Value7,1)

    Value7 = Cint(Value7)

    Value = Value1 + Value2 + Value3 + Value4 + Value5 + Value6 + Value7

    Value = Right(Value,1)

     

     

    0
  • Avatar
    Christoph Schneider

    Good morning Pete,

    thanks for the fast reply!
    I did try your script and i works well. I will do some more tests to be 100% sure it works an big batches and with the scanning.

    I want to thank you soo much, you helped me alot. I really appreciat that.

    Have a wonderful day!

    BR Christoph

    0

Iniciar sesión para dejar un comentario.