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

Question

Question

Generate Laserfiche Web Client URLs syntax - Username Token

asked on August 3, 2023

I have a simple search syntax tested and copied directly from the Webclient that works great in the "search repository tool". It comes back with a results count when I tested it.

This is the Search Syntax:

{LF:Created>="7-3-2023", Created<="8-3-2023"} & ({LF:Creator="TRIBENET\hayleeglasscock"})

In workflow, I am using the "Generate Laserfiche Web Client URL" tool with the syntax above by using tokens in my workflow.

Search Syntax: {LF:Created>="%(DateTokenCalculator_MONTH)", Created<="%(Date)"}& ({LF:Creator="%(User1)"})

 

The search works fine with the date created portion alone. But if I add the Username part then I have no results found. I have tried testing this by forcing the username in the syntax and several variations. After looking into it further, When I test the search URL the search syntax changes. By placing a forward slash(/) instead of a backslash(\) required to search by a domain user. See below.

 

{LF:Created>="7/1/2023", Created<="8/3/2023"} & ({LF:Creator="TRIBENET/hayleeglasscock"})

 

How do I keep this from transposing the slash? I tried these variations:

1. Used the token from the workflow

{LF:Created>="%(DateTokenCalculator_MONTH)", Created<="%(Date)"}& ({LF:Creator="%(User1)"})

2. Split the token after the \ and statically kept the domain name and slash

{LF:Created>="%(DateTokenCalculator_MONTH)", Created<="%(Date)"}& ({LF:Creator="TRIBENET\%(User1#@Split(\)@#)"})

3. Forced the domain name in the search. 

{LF:Created>="7/1/2023", Created<="8/3/2023"} & ({LF:Creator="TRIBENET/hayleeglasscock"})

 

All three ways still transpose the slash when the search is run.

Screenshot 2023-08-03 142529.png
0 0

Replies

replied on August 3, 2023

Try adding the Encode URL function to the username token:

1 0
replied on August 3, 2023

This is a bug in the web client where it will incorrectly convert backslashes in the URL to forward slashes. Reference ID #123399.

Normally, the way forward would be to use EncodeURL on the token value, but from your design above that's not possible because the backslash is part of the static text, not a token. But you should be able to just replace it with the encoded version.

So instead of
{LF:Creator="TRIBENET\%(User1#@Split(\)@#)"}

use

{LF:Creator="TRIBENET%5C%(User1#@Split(\)@#)"}

0 0
replied on August 4, 2023

I changed out the search syntax to what was reccomended and it works in workflowwhen I test the search in the "Generate Web Client URLs" tool. But when an email is generated with the URL, it still does not generate properly. I tried several variations and got the same result.

0 0
replied on August 7, 2023

Right, the URL will look broken because it needs the encoded backslash to get the web client to load it properly.

However, if you're saying it looks broken because it stops highlighting in the middle, that's the mail client guessing what a complete URL is. You can be specific about what the full URL should be by wrapping it in an href tag.

<a href="URL TOKEN GOES HERE">DISPLAY NAME GOES HERE</a>
 
So something like <a href="%(GenerateLaserficheWebURLs_User2SearchEntriesURL)">Click me!</a> should look like Click me!
 
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.