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

Question

Question

Problem with Retrieve PDF Form Content

asked on September 24, 2016 Show version history

We have a situation in Workflow 10.0.0.249 where we are using the table option to retrieve the information from a pdf. The pdf has 66 places for name and address information (i.e. 66 possible names) and we need to know how many of these names have been filled in.

The field appears to be identified correctly:

 

 

And then we try to iterate through the contents in a script:

            Dim sTokenName As String = "RetrievePDFFormContent_Last_"
            Dim sTempTokenName As String = ""
            Dim nIndex as Integer = 0
            For nIndex = 1 to 66
                'Use the Last Name as a marker
                sTempTokenName = sTokenName & nIndex
                sTempValue = GetTokenValue(sTempTokenName)
                sTempValue = sTempValue.Trim
                'Look for the first empty field
                If sTempValue.Trim.Length = 0 Then
                    'Remove one value
                    nIndex = (nIndex - 1)
                    'And bolt
                    Exit For
                End If
            Next

This will create the token, "RetrievePDFFormContent_Last_1, "RetrievePDFFormContent_Last_2, etc, with the ending number being the index.

In the script editor, the Tokens show up without issue:

When we run this, we get the error, "The token "RetrievePDFormContent_Last_1" was not found. [051-SF1]

 

Even though the values show up fine in the Token list:

 

Are we missing something obvious?

 

0 0

Answer

SELECTED ANSWER
replied on September 26, 2016

No, that would only give you the first value. You can convert it into a list object and work with that. See this thread on the details.

0 0

Replies

replied on September 26, 2016

The message is correct. Based on your screenshots, the activity generates a multi-value token called "RetrievePDFFormContent_Last".

0 0
replied on September 26, 2016

Hi Miruna -

 

In that case the syntax would be:

GetTokenValue(sTempTokenName) .ToString() ?

Tx

 

0 0
SELECTED ANSWER
replied on September 26, 2016

No, that would only give you the first value. You can convert it into a list object and work with that. See this thread on the details.

0 0
replied on September 26, 2016

Perfect, thanks.

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

Sign in to reply to this post.