Folder Count Flow Behavior

Last Updated: 12/07/2018 Introduced in Version: 4.0

This tutorial demonstrates how to create a Folder Counter in Decisions 4.0. This can be achieved with Folder Count Flow Behavior.

Example:

In this example we are going to demonstrate how to create a counter for Folder to display number of its sub-folders.

We are going to create a counter for Demos Folder.

In the Designer Folder we click Create Flow on the Folder Actions Panel.

In the resulting window we Name the Flow and select CREATE to open the flow designer.

 

In the Flow Designer, locate Settings within the Properties panel on the right. Change the Behavior Type to Folder Count Flow.

 

Navigate to Setup Counter within the Properties panel on the right.

From Counter Type drop-down we can pick For Folder or For Folder Type. In this example we are going to pick For Folder.

Note: For Folder Type option would let us select Folder Type so this counter would be displayed on all Folders of the defined type.

Next under Folder select PickLocate the Folder to display the Counter on and select Pick.

There are a couple options of Change Type:

  • On Timer (to define Time Span to run this Flow)
  • On Folder Change (to listen Folder Change events and refresh counter)

In this example select, On Folder Change.

Also, there is an an option to Maintain Count By User. In this example leave it unchecked.

 

Start building the Flow. On the outcome from the Start step add the GetSubFolders step from Integrations > All Integrations > Internal Services > Folder Service category.

Setting up the GetSubFolders step: locate Inputs under id input, use Select from Flow. Then select Pick, in the Pick Data dialog select the Folder > FolderID value.

*NOTE: Folder data has the value of the folder selected earlier in this tutorial.

 

Connect the outcome from GetSubFolders step to the End Step in our Flow.

Select End Step. The End Step for this Flow Behavior Type already has the output FolderCount (Int32) and Important (Boolean) data.

Locate Inputs section for the End Step. For the Folder Count input, use Select from Flow. Select Pick, in the Pick Data dialog select Get Sub Folders 1_ Output > Count.

For the Important input, define Constant, True value. This defines an orange background for the Counter. If Important is set to False, our Counter background will be grey.

 

This completes our Flow. Save and close Flow Designer.

In the User Portal, refresh the screen and view the Folder has a counter.

Additional Resources