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

Question

Question

multivalue token from script not returning full value

asked on March 6, 2014

 Hi,

 

In workflow 9.0 I am having an issue with a script that compares values between to documents.

 

I query the two documents from the workflow using the get field values activity.

In the script I compare the values and then return some text and the token value but when I retreive the token values from the script I only get the text.

In the script editor when I run the script I get the variables but in the workflow when I just get the text

" Client Number does not match " when I try to place the token in a sticky note.

Any one any idea why?

 

This is only a fraction of the code as I am comparing multiple values. 

 

Dim CClientNumber as String = gettokenvalue("RetrieveFieldValuesFromCopy_Client Number")

 

dim OClientNumber as String = GetTokenValue("RetrieveFieldValuesFromOriginal_Client Number")

 

Dim Index as Integer = 0

Dim Results(2) as String

 

if CClientNumber <> OClientNumber Then

     results(index) = CClientNumber.tostring & " Client Number does not match " & OClientNumber.ToString

     index = index + 1

end If

 

end If

for a as Integer = 0 to 2

    msgbox(results(a))

Next

settokenvalue("Compare_all",results)

0 0

Replies

replied on March 6, 2014

Your code is not very clear, but assuming you do get a multi-value token for "Compare_all", you need to explicitly specify you want all values in the sticky note. By default, Workflow uses the first value of a multi-value token unless the activity property specifically accepts multi-value tokens (for ex, For Each Value) or token indexing or functions are used.

 

In your case, you'd want to specify you want all the values and a delimiter. You can do this through the Token editor or type in the syntax. For ex, %(Compare_all#[]#) will give you all the value delimited by a line break.

0 0
replied on March 7, 2014

I am getting multiple values in the token.

 

What I am not getting is the full string from the array.

The values from the string variables are missing.

The token only has the text " Client Number does not match "

not the full value of <String Variable Value> " Client Number does not match " <String Variable Value> .

 

Thanks

 

Andrew

0 0
replied on March 7, 2014

Just deleted the script created a new one and pasted the code into the new one and it worked.

 

Thanks for the help

 

Andrew

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

Sign in to reply to this post.