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

Question

Question

Read token collection from Retreive Field Values activity

asked on March 3, 2016 Show version history

Looking for some help reading the tokens from the Retrieve Field Values activity. I specifically need to iterate through it to retrieve those fields (1 data field, 2 data field) and their values inside my custom activity (My Custom Activity). Any help is appreciated! C#

read tokens from Retrieve Field Values.jpg
0 0

Answer

SELECTED ANSWER
replied on March 3, 2016

Thanks for the quick response.  Here's my recommendation:


Add one (or more, if there are multiple fields/signatures) string properties to your custom activity for storing the appropriate field tokens.  In the Activity Proxy Generator, make those properties support tokens.  In your workflow definition, configure your custom activity with the field tokens.  When your custom activity runs, you can just resolve the token values in your custom activity properties and you'll have your base64 data.  There's no reason the runtime activity ever even needs to know what fields were involved--it just needs to know how to get the base64 data, which, in this case is coming from tokens.

1 0

Replies

replied on March 3, 2016

Hi Kyle,

I saw your other post (http://answers.laserfiche.com/questions/92996/Custom-Activity-read-fields ) as well, but I can't really answer your question without more information.  What exactly are you trying to do? What does your custom activity do?  There might be an easier way than writing a custom activity, or it may be that you want to provide more of a UI to configure your custom activity.  I think you're probably on the right track by using a Retrieve Field Values activity instead of trying to get the fields directly (in your other post), but again, it depends on what you need to do with the fields.

Can you elaborate on what you mean by "iterate through it to retrieve those fields"? Are the fields you need to get the values of known in the workflow definition? Are you using in your custom activity in multiple workflows, each of which has different fields?  Do you have multi-value fields that you need to iterate through?

0 0
replied on March 3, 2016

What exactly are you trying to do?

I am copying a signature from a Laserfiche form onto a PDF. I want to select the fields that contain the base64 encoded signature image and build the signature back into an image and place it on a PDF. I know that this is currently not possible with the default Laserfiche Workflow activities.

 

Can you elaborate on what you mean by "iterate through it to retrieve those fields"?

I need to iterate through the fields selected in the Retrieve Field Values activity via my custom activity. I know I can get the value for a token by specifying the name of the token, but in this case, I only want to get the value of the token(s) that are specified in the Retrieve Field Values activity (those being '1 data field' and '2 data field').

 

Are you using in your custom activity in multiple workflows, each of which has different fields?

Yes, I could. That is why I need to iterate through the fields selected in the Retrieve Field Values activity, otherwise I could just use hardcoded fields.

 

Do you have multi-value fields that you need to iterate through?

No.

0 0
replied on March 3, 2016

Perfect! That should work nicely, thanks!

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

Sign in to reply to this post.