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

Question

Question

Folder name in dbo.toc different to repository

asked on March 22, 2023

We have a few folder name that contain "/" i.e. "Under Seel/Deed". However, in dbo.toc, it is stored as "\" i.e. "Under Seel\Deed".

I have a form that displays the folder name via a lookup on dbo.toc. Then a workflow to store a file based on the form values in the repository. As you can see, switching the "/" to "\" means that is incorrect.

Obviously, I can rectify this in the workflow, but may cause issues.

0 0

Answer

SELECTED ANSWER
replied on March 22, 2023 Show version history

I’m guessing here…

But I think the underlying issue is that Laserfiche uses \ for folder path structure but allows lots of characters in paths and names that maybe wouldn’t be acceptable in other programs, including the / character.

However, when interacting with the SQL database, the / character can be a bit problematic, especially when dealing with RegEx functions.

Therefore, the developers may have made a decision to switch / and \ between the application and the database to eliminate a particular problem they were encountering.

If that is the case, you may have no choice but to find a solution to work around it yourself.

One idea is to add a custom view on the repository database that includes all the values you are needing from the toc table, but does a REPLACE function to switch those characters ( example: REPLACE(columnName, '\\', '/') AS newColumnName - or something along those lines).  Then have your lookup work from that view instead of the toc table directly.

3 0
replied on March 22, 2023

The part about the path separators is essentially correct. I believe / is the only character that gets replaced like this in the database, so your replace call should work - either as-is to be run as part of the query, or something similar that the application runs on the result.

2 0

Replies

You are not allowed to reply in this post.
replied on March 22, 2023

Your best bet may be to create a view that reformats the output of the name column and use the view to populate your form lookup.

REPLACE([name], '\', '/') AS [name]

 

You are not allowed to follow up in this post.

Sign in to reply to this post.