Two barcodes on the page

  • 42 Views
  • Last Post 3 weeks ago
stan780953 posted this 3 weeks ago

A customer wants to add a backup barcode to a document, so that if the first barcode is damaged or unreadable, the second one can be processed instead. I'm trying to create a script that ensures only one of the two barcodes is processed, but I keep encountering the following error:

HRESULT: 0x80010105 (RPC_E_SERVERFAULT)

 

Is this kind of setup possible? Any tips or suggestions would be appreciated.

Here the script:

Dim output

If Not IsEmpty(BARCODE1) And BARCODE1 <> "" Then

    output = BARCODE1

ElseIf Not IsEmpty(BARCODE2) And BARCODE2 <> "" Then

    output = BARCODE2

Else

    output = ""

End If

 

output

 

 

 

luca.scarpati posted this 3 weeks ago

fHi Stan,

 

this error: (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)), means there is an error in the execution of the VBS script...it's a general error.

 

The script below seems good but are you sure you didn't miss some lines? for example did you declare that you are taking the variables in the right way with our SDK calls?

For example:

BARCODE1 = Metadata.Values("YOURBARCODE1")

BARCODE2 = Metadata.Values("YOURBARCODE2")

Dim output

If Not IsEmpty(BARCODE1) And BARCODE1 <> "" Then

    output = BARCODE1

ElseIf Not IsEmpty(BARCODE2) And BARCODE2 <> "" Then

    output = BARCODE2

Else

    output = ""

End If

 ...obviously YOURBARCODE1 and YOURBARCODE2 you have to replace with the variables of your workflow.

 

Have a nice weekend cool!

Best regards,

Luca

 

 

Close