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

Question

Question

Workflow - Entry count for Folders and sub-sub folders

asked on May 9

Hello,

 

I am writing a workflow to give me a count of the number of entries within a folder. The end goal is to email a list with the names of the folders and the count of entries within.

 

I am having trouble when a subfolder has its own subfolder, and I need to look into that as well. I am using the Search Repository to find the folders and then a For Each Entry loop to find the counts. I have also added another nested For Each Entry and a conditional loop to try to get the subfolders subfolder. 

 

I keep getting where in the messages I can look in my repository client and the numbers are matching for the main folder and the subfolders, but no the 3nd level down.

 

Any idea on how I might get this to work?

Folder Example.png
Workflow Example.png
0 0

Replies

replied on May 9

Here's one way to do it:

  1. Create Multi-Value Token
    • Create Token - enabled for multi-value - named: Folder List
  2. Search Repository for All Folders Under a Parent Folder
    • Syntax:      {LF:Name="*", Type="F"} & {LF:LOOKIN="\Search Folder"}
  3. Find Entries in Current Folder
  4. Assign Token Values
    • Append Values to the Folder List token.
      <tr><td>%(ForEachFolder_CurrentEntry_FullPath)</td><td>%(FindEntriesinCurrentFolder_Result Count) Documents in Folder</td></tr>
      
    • the <td> and </td> tags are setting these up to be columns in an HTML table.
  5. Sort the Folder List
    •  
  6. Email
    • Body of the email:
      <table border="1" style="table-layout:fixed; width:1550; border-collapse:collapse;"><tr style="background-color:blue; color:white;"><td>Path</td><td>Document Count</td></tr>%(Sorted Folder List#[ ]##"HTML"#)</table>
      
    • Here's what the Sorted Folder List token looks like:

 

End result looks like this:

​​​​​​​

3 0
replied two days ago

Thank you Matthew!

 

This is exactly what I was looking for. 

 

A side note, Gmail does not like the HTML format, Outlook shows the table just fine.

0 0
replied two days ago Show version history

It’s the most basic version of an HTML table - so it is surprising they are having an issue.  You could Google tips to edit an HTML table to make it more viable in GMail.  Perhaps some specific tweaks to the styling.

Also, I was thinking that the fact that parent folders show sorted after their children due to the alphabetical sorting might be tweaked by just adding a space after the path token but before the </td> tag.  I think space might alphabetically come before the backslash while the end of the value currently comes after it.

<tr><td>%(ForEachFolder_CurrentEntry_FullPath) </td><td>%(FindEntriesinCurrentFolder_Result Count) Documents in Folder</td></tr>

 

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

Sign in to reply to this post.