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

Question

Question

How do you use only the First Result of a Search Repository activity in the Update Word Document activity?

asked on October 1, 2017

I have a word template in my repository. In Workflow, I want to find this document using a Search Repository activity (configured to return only the first result), then use it as the source document for an Update Word Document activity.

The problem is that Update Word Document can only grab the "Output Entries" token from the Search activity, rather than the First Result token.

As a result, Workflow tries to use the XML that is returned for Output Entries in the Update Word Document activity, and obviously fails.

This inconsistency/counter-intuitive behavior has me stuck. I also tried using a Find Entry activity to find the word template since that only returns one result, but Update Word Document can't use that as its source?

Also tried to iterate through the Search activity's Output Entries using a For Each Entry loop, but that had the same issue: Update Word Document couldn't use the Current Entry as the source document.

So the question is: how do I find a single word document in the repository using Search or Find and feed that to the Update Word Document activity?

1 0

Answer

SELECTED ANSWER
replied on October 2, 2017

I think I have a solution for you.

1. Search for the Word template.

2. Use the "Download Electronic Document" activity on the result of the search.

3. Update the Word document associated with the "Download Electronic Document" activity. You will need to know the field names in advance if you want to populate them--you cannot use the "Import field names from document" option as you can with Server Attachments.

4. Use a "Create Entry" activity to create a placeholder for saving the updated Word document.

5. Attach the updated document to the placeholder created in step 4.

I just tested this out on my demo system and it worked great.

~Rob

3 0

Replies

replied on October 2, 2017

Hello Ege,

Is there a reason you can't add it as a server attachment via the Workflow Administration Console? I wasn't able to use the "Search Repository" or "Find Entry" activities to populate merge fields, but was able to do so if the document was a server attachment.

~Rob

0 0
replied on October 2, 2017

These are legal templates that the legal clerks will be updating fairly regularly. So they need to be able to drag and drop the updated versions into a repository folder and add them as new versions of the templates.

I can't make it a server attachment - those are static. I also can't give those users access to the WF server disk.

0 0
replied on October 2, 2017

I see--that's definitely a tough situation. I'll play around with it a little more; if I come up with anything, I'll post again.

0 0
SELECTED ANSWER
replied on October 2, 2017

I think I have a solution for you.

1. Search for the Word template.

2. Use the "Download Electronic Document" activity on the result of the search.

3. Update the Word document associated with the "Download Electronic Document" activity. You will need to know the field names in advance if you want to populate them--you cannot use the "Import field names from document" option as you can with Server Attachments.

4. Use a "Create Entry" activity to create a placeholder for saving the updated Word document.

5. Attach the updated document to the placeholder created in step 4.

I just tested this out on my demo system and it worked great.

~Rob

3 0
replied on October 2, 2017

Gotcha. I didn't think of Download Electronic Document. I will give that a shot. Thanks!

0 0
replied on October 2, 2017

Hi Ege,

Would you mind marking my reply as the answer, if it worked for you?

Thank you!

Rob

0 0
replied on October 2, 2017

Find Entry just gets a hold of the document, it does not download its content. So there's nothing to use from it. Like Rob said, you have to get the e-doc with Download Electronic Document.

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

Sign in to reply to this post.