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

Question

Question

Laserfiche Workflow SDK script

asked on November 20, 2024

We have a C# script that is supposed to grab variables from a form that executes the workflow when completed. 

 

The current syntax we are using in the C# script: 

string groupName = GetTokenValue("ForEachRow_Distribution_List").ToString();

 

When using the same token on an email task, the text is consistent with the values on the form.

 

When we run the script with the token mentioned above, the script fails/does not complete the tasks. 

 

The script works when testing alone in the script editor. 

 

Is our syntax correct? 

 

Thank you! 

 

 

0 0

Replies

replied on November 20, 2024

Did you verify that your token names match exactly? If it works when you run it in the editor, you'd be manually entering the token values to kick it off, so that's something to look at first.

When you're running the workflow, the script may not be getting those values. I assume you already have the script activity inside of the for each row loop, so I'd start with the token names.

For example, in your screenshot you have "ForEachRow_Action_" with an extra underscore at the end, which may not match the actual token name.

3 0
replied on November 21, 2024

You could trouble shoot by using the SetTokenValue() to report back what your script is getting for values from the GetTokenValue()s.  Then use a Track Tokens activity after the script to capture what the script is getting.

0 0
replied on November 21, 2024

I don't recall the exact situation I encountered, but I have had an occurrence where running from the designer passed the token as an array of strings, but the Forms launched workflow passed the token as a simple string.  Good luck.

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

Sign in to reply to this post.