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

Question

Posted to Laserfiche Cloud

Question

token editor search and replace \ with /

asked on November 27, 2023

Hello All, I've spent a good few hours trying to figure out how to convert a windows file path to search for \ and replace with /.  We need to build a path that is suitable for unix and the slash must be switched from \ to /.  There is an entry in answers on how to accomplish this, but it's not well named and lacks a screen shot.

For the sake of anyone else who walks this path, here is a screen shot and a link to the original post that gave the solution. https://answers.laserfiche.com/questions/127477/Split-value-in-Workflow

How to use search and repolace in the token editor.gif
0 0

Answer

SELECTED ANSWER
replied on November 28, 2023

You can use SUBSTITUTE in the Token Calculator to accomplish this

SUBSTITUTE( %(ForEachValue_Current Value),"\"  , "/") 

This:

\1034 Administrative Policy\All Policies\Acceptable Request Guideline Policy

Becomes this:

/1034 Administrative Policy/All Policies/Acceptable Request Guideline Policy

2 0

Replies

replied on February 26, 2024

@████████, i was so deflated when i read your post because i looked everywhere for a function like this.  The substitute function is not in the LF Cloud token editor.  Is this am on prem difference?

 

0 0
replied on February 27, 2024

Hi Sean, the Token Editor and Token Calculator are 2 separate things. The Token Calculator is a standalone workflow Activity (), where the Token Editor is a Token function used to format a token. In the example below, I am using the Token Calculator Activity from the Workflow Toolbox. It is the same in both Cloud and OnPrem.

0 0
replied on February 28, 2024

ahh, thanks Steve - you're very generous with your knowledge. I will check that out, thank you again. Sean

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

Sign in to reply to this post.