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

Question

Question

Removing extra spaces from a token value.

asked on December 9 Show version history

I’m importing a specific set of documents via Quick Fields and applying some metadata. This metadata is then used to locate a source document, retrieve its text, and extract additional key metadata fields for the imported document. The text retrieval and pattern matching are working well; however, I’m encountering issues with extra spaces, tabs, and newlines in the text.

When tab values match a specific pattern, the workflow follows a conditional path to clean up that pattern. In this case, the pattern is “Numerical 3,” but the extra tabs and spaces are causing problems during the rename activity.

Below are examples from my current process and the approach I tried based on a Laserfiche Answers post. While testing token value modifications appears promising, the token still retains those spaces and tabs.

Feature Request:
Could we add a Replace option in the token editor? This would allow replacing patterns like \s+ with a single space or removing special characters entirely.

 

Other LF Answer Post - Regular Expression - Remove Extra Spaces - Laserfiche Answers

 

Part 1:

Part 2: - Numerical Value 3

Numerical 3 Pattern Value:

3. Executed counterpart of the First Amendment to Guaranty Agreement dated as of April 1,2004,from Bombardier Inc. (the "Guarantor"). 

 

Modify the Numerical 3 Token Value:

 

0 0

Replies

replied on December 9 Show version history

This can be accomplished in Quick Fields with the Substitution activity

You can (kind of) do it with the token editor too, but you'd need to split on all the tabs/spaces first because the Remove function is meant for removing items from a collection (multi-value token).

 

For workflow, you can use pattern matching, or you can use a Token Calculator activity with the Substitute function.

0 0
replied on December 9

Ya this is correct, the original logic is exactly what you should do but you have to do it in reverse order. You'll need two different tokens, one to store the multi value token and another to make just a single string but either option works

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

Sign in to reply to this post.