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

Question

Question

Identify folders without version tracking enabled

asked on December 20, 2021

Hi,

 

We're looking for a way to identify folders on which version tracking is not enabled. I don't think this is possible using the search syntax so we have been looking at a way to identify them via a SQL query. Between the client and ourselves we have come up with two potential queries but they return slightly different results:

 

Query 1 (returns 121 rows)

SELECT tocid, name, parentid, toc_flags

FROM [toc]

WHERE toc_flags = '1' and etype = 0

 

Query 2 (returns 128 rows)

SELECT tocid, name, parentid

FROM [Laserfiche_Dev].[dbo].[toc]

WHERE toc_flags <> 2097153 AND etype = 0 AND tocid Not in (1,2)

 

Is there a conclusive way to determine this?

 

Thanks,

 

Nigel.

 

0 0

Replies

replied on December 20, 2021

Hi Nigel, this is not in answer to your SQL query but maybe another way to go about this.

You could have a Workflow that would perform a Search for Folders only and with the results have the Is Version Controlled property checked. With a Workflow, you could then have a condition where you could add an Information Tag such as UnderVersionControl. 

Once the tag was applied you could then perform a basic search in the Repository to find Folders without the Tag as shown at the bottom

 

With this you can then use a condition to check the Version Status, and then add the Info Tag to the document under that condition

This would be a basic Search you could then perform in LF of which you could generate a Report from the results

 

1 0
replied on January 1, 2022

Hi Steve, we tested your suggested approach and found that the "Is Version Controlled" property in workflow seems to work only for documents; not folders which are not under version control.

Would appreciate if you could provide us an alternative approach to the original requirement.

Laserfiche Version used: 10.3.0.502.

0 0
replied on January 3, 2022 Show version history

Hi Faraz, sorry about sending you down the wrong route on that. Will have to check into the SQL statements some more.

0 0
replied on December 21, 2021

Thanks Steve - that's helpful and a good alternative. I wasn't aware that property was exposed from the activity.

0 0
replied on January 1, 2022

Hi Steve, we tested your suggested approach and found that the "Is Version Controlled" property in workflow seems to work only for documents; not folders which are not under version control.

Would appreciate if you could provide us an alternative approach to the original requirement.

Laserfiche Version used: 10.3.0.502.

replied on February 8, 2022

Just an update on this, I was able to find an SDK method within an SDK script in workflow to identify folders for which the "Automatically place new documents under version control"  setting is enabled.

The workflow loops through all folders in the repository and assigns a tag (or tag comment) to indicate if that property is set.
 

 protected override void Execute()
        {
            // Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session
FolderInfo FI = (FolderInfo)this.BoundEntryInfo;
SetTokenValue("tkIsVC",FI.AutoVersionChildren);

        }

I'm sure this ultimately involves a SQL flag in the backend but I wasn't able to reliably identify this.

 

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

Sign in to reply to this post.