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

Question

Question

Laserfiche Cloud: how to merge and sort files.

asked on March 21

Hi Everyone, 

I have a manual process,which I need to automate. I want to know which product of Laserfiche cloud can achieve this. 

I have explained the steps below.

Step 1: User uploads a document namely document1 with certain values on the document it, lets say value 1, value2, value 3 to value 5. 

Step 2: Capture profile should capture these values from the document and send this value as an input to a workflow. 

Step 3: The workflow should search the repository for all documents which contain these values in their file name. 

Step 4: when documents are found, the workflow should sort all the documents in the right order such as value 1, value 2, value 3, value 4, value 5. 

Step 5: workflow should then merge all the documents found along with document1 uploaded by the user and sort the documents in the order, document1, value1, value 2, value 3.

The activities which a workflow should do is capture, search, merge  and sort.

Any thoughts on how this might be possible. 

Thank you. 

0 0

Answer

SELECTED ANSWER
replied on March 26

Also, if a given token might be a range OR a single value, you're probably going to need to use a Conditional Decision activity to use different routes for each--Invoke Workflow if it's a range, simply append the value if it's a single value.

0 0

Replies

replied on March 21

Workflow and Capture Profiles are the right tools, but your process needs to be thought of a little differently: sort the tokens, then add each document one at a time.

Configure a starting rule to start a workflow, say, based on the folder the user is uploading the document to (Step 1)

Workflow:

  • Use a Run Capture Profile activity to capture the values from the document (Step 2)
  • Depending on how you want the documents/values sorted, you may need to use an Assign Token Values activity to create a multi-value field and then use a token function to sort the values alphabetically.  Or you can add the values individually in the order you want them.  If some values might be blank, you can also use a token function to "remove empty entries".
  • Loop over each of the values (For Each Value activity)
    • Search repo for documents with the "current value" in their name (Step 3)
    • Loop over each document found (For Each Entry activity)
      • Use a Move Pages activity to merge the documents into the starting document (probably using the option to delete the original document)


Doing it this way, you don't actually need to sort the documents--you're sorting the values and then processing each set of "found" documents in the order you want them appended to the original document, thus they'll be "sorted".

Note that this is a fairly intensive workflow--for each uploaded document, you're performing multiple repository searches (N) and many document merges (N*M).

0 0
replied on March 26

I am stuck in step 1, the values found on the doucment are numbers but they are not all displayed, 

For example the numbers are displayed as 2001-2005. The capture profile will capture value as  2001-2005 but I need to find files which are named as 2001, 2002, 2003, 2004 and 2005.

How can workflow find the numbers between 2001 and 2005 and use these values as input to search repository for files which are named as 2001, 2002, 2003, 2004 and 2005. 

Would the token calculator activity in the workflow help this?

0 0
replied on March 26

Ah, you need to interpolate the values of a range.  This is possible with Workflow, but the only way I could find to do it required six activities (however they run very fast):

  1. Assign Token Values creates an empty multivalued token to hold the interpolated values.
  2. Pattern Matching activity splits the range into a start value and and an end value (e.g., for 2001-2005, you could use the patterns "(\d+)-" and "-(\d+)" to get 2001 and 2005).
  3. Token Calculator activity to calculate the difference in the range (+1 if inclusive) using the tokens from Step 2
  4. Repeat activity to iterate X times where X was calculated by Step 3
  5. Within the Repeat activity, Token Calculator activity to generate an interpolated value (e.g., by adding the Iteration Count token to the Range Start token)
  6. Within the Repeat activity, Assign Token Values activity to append the interpolated value to the multivalued token you created in Step 1

     

The Workflow

Proof that it worked (from the Tokens tab):

My recommendation is to make this workflow a separate, generic workflow for interpolating a range (input parameter: the range, output parameter: the multivalued token with the interpolated values) and then use an Invoke Workflow activity in your main workflow.

0 0
replied on March 26

It gets complicated, how should I change the workflow if there are multiple numbers on the document ,for example capture profile captures the below values

2001-2005

2015-2019

2021 , 2024

Here I need to find the range of numbers from 2001 to 2005, 2015 to 2019.

so the input to search file in repository are 2001,2002,2003,2004,2005,2015,2016,2017,2018,2019,2021 and 2024

values 2021 and 2024 are single values they are not a range. 

0 0
replied on March 26

If you make the workflow separate like I recommended above, you can invoke it for each range.  You also use an Assign Token Values activity to "merge" multi-valued tokens by appending their values.

So, for example:

  1. Invoke Workflow (Interpolate Values) takes in "2001-2005" and returns a token with values [2001,2002,2003,2004,2005]
  2. Invoke Workflow (Interpolate Values) takes in "2015-2019" and returns a token with values [2015,2016,2017,2018,2019]
  3. Assign Token Values activity creates a new MV token called "All Values" and then specifies its values as:
    1) the token from step 1
    2) the token from step 2
    3) any other individual values (e.g., from other tokens returned by the capture profile)
    It will automatically "expand" any multivalued tokens into multiple tokens.

    As an example, I created a multivalued token "Other values" and copied its values into the original multivalued token I showed above and you can see in the results that it appended each value.

0 0
SELECTED ANSWER
replied on March 26

Also, if a given token might be a range OR a single value, you're probably going to need to use a Conditional Decision activity to use different routes for each--Invoke Workflow if it's a range, simply append the value if it's a single value.

0 0
replied on March 27

Thank you Jacob, I am working on building this workflow, I will get back when I am stuck. 

0 0
replied on March 22

I will start working on this and get back to you when I am stuck, Thank you Jacob. 

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

Sign in to reply to this post.