You are viewing limited content. For full access, please sign in.

Question

Question

Read stamp text in sdk

asked on October 6, 2016

Hi All,

 

In workflow I have written a script using the sdk to retrieve the text of all stamps on a document.

When I try I am only able to see the text in the first stamp what am i doing wrong?

            dim Rejected as boolean = False
            dim Approved as Boolean = False

            dim returnValue as String = ""

            dim Doc as DocumentInfo = Document.GetDocumentInfo(boundentryid,rasession)
            dim Ann as List (of AnnotationBase) = doc.GetAnnotations()

            for each anno as AnnotationBase in Ann
                if anno.annotationtype = AnnotationType.Stamp Then
                    if anno.customdata.toupper.contains("APPROVED BY") Then
                        Approved = true
                    elseif anno.customdata.toupper.contains("REJECTED BY") Then
                        Rejected = true
                    end If
                end If
            Next

            if rejected = false and approved = false Then
                returnValue = "No Stamp"
            end If

            if rejected = false and approved = true Then
                returnValue = "Approved"
            end If

            if rejected = true and approved = false Then
                returnValue = "Rejected"
            end If

            if rejected = true and approved = true Then
                returnValue = "Error"
            end if

           me.SetTokenValue("Result",returnValue)

            

 

0 0

Replies

replied on October 6, 2016

Using your code, I am able to see the CustomData on multiple stamps on the same document. Is the CustomData empty on some of the stamps? Stamps that are generated from an image don't have CustomData assigned.

0 0
replied on October 10, 2016

The stamps are "Approved By <Username> <Date>" and "Rejected By <Username> <Date>" not images.

 

0 0
replied on October 10, 2016

Your code works for me in Workflow 10. Are you sure your other stamps are not private stamps?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.