Skip to main content

Search

Search

Verify 1 Field Against Another For Duplication

Comments

5 comments

  • Avatar
    Shotaro Ito
    [quote name='sjesweak' timestamp='1328290807' post='1657']
    I have 2 serial labels that are manually entered by the user for our packaging needs. I'm trying to detect when they might accidentally duplicate the serial on the label accidentally.
    [/quote]

    Hi sjesweak,

    To compare multiple user prompt input, try Event control script.
    Create a dummy text at off-label, and make that as VB Script source, Event control script.
    In OnPostPrompt event, set script like below.
    [code]If Format.NamedSubStrings("S1").Value = Format.NamedSubStrings("S2").Value Then
    Format.CancelPrinting "Error",""
    End If[/code]

    OnPostPrompt event runs only once after user prompt has been closed, and it properly reflect user's prompt input.
    One drawback is - you don't have an option to return to prompt dialog, unlike OnPostPrompt.

    When you give "" to 2nd parameter of CancelPrinting, it doesn't allow you to continue print.

    Hope that helps.

    [attachment=109:CancelPrinting.btw]
    0
  • Avatar
    Legacy Poster
    That worked great!!

    [quote name='Shotaro I -Seagull Support' timestamp='1328515499' post='1661']
    Hi sjesweak,

    To compare multiple user prompt input, try Event control script.
    Create a dummy text at off-label, and make that as VB Script source, Event control script.
    In OnPostPrompt event, set script like below.
    [code]If Format.NamedSubStrings("S1").Value = Format.NamedSubStrings("S2").Value Then
    Format.CancelPrinting "Error",""
    End If[/code]

    OnPostPrompt event runs only once after user prompt has been closed, and it properly reflect user's prompt input.
    One drawback is - you don't have an option to return to prompt dialog, unlike OnPostPrompt.

    When you give "" to 2nd parameter of CancelPrinting, it doesn't allow you to continue print.

    Hope that helps.

    [attachment=109:CancelPrinting.btw]
    [/quote]
    0
  • Avatar
    Christian Vargas

    Hi guys. I want to do the same thing. But instead of comparing a Scan to another Scan to detect the duplicate, I need to compare a scan to a range, to check if the value in the scan is found anywhere in that range, to detect if it's a duplicate. For example, the range would be something like, ALL Rows of Column B of Table 2

     

    OR is there a way to detect if a Scan is a duplicate by checking if it was previous scanned on a past print job  by using the Reprint Station records?

    0
  • Avatar
    Shotaro Ito

    If you have multiple input box on the same dialog, then you can possibly compare each variable in VB Script (repeat IF-Then patterns)
    if you need to compare with previous print job's value, I don't have a good idea. Perhaps consider to adjust reader device's setting (usually they have option to prevent double scan) or operator's workflow.

     

     

    0
  • Avatar
    Thomas Rentz

    Das werden wir ebenfalls nutzen . Könnt ihr mir die btw Datei zusenden (CancelPrinting.btw)

    Vielen Dank

    0

Please sign in to leave a comment.