CasewareDocs

EnumerateAuditFolders

Returns the list of audit folders within the current IDEA working folder. Each audit folder within the list is represented by descriptor object of type AuditFolderData (metadata object).

Compatibility

Available as of IDEA version 10.0

Syntax

EnumerateAuditFolders(dataScope as Integer) as Object

Parameter

dataScope

Specifies the level of metadata details delivered by AuditFolderData objects. Possible values are:

Level of metadata details
Value Description

0

basic data: name, audit area, audit folder type(normal, VAT, multi-period)

1

basic data + period data: audit folder period is available

2

basic data + related folders: list of related audit folders is available

3

all (basic data + period data + related folders)

Return Value

Collection of AuditFolderData objects. Collections is represented by the class AuditFolderDataAccessor.

Properties of AuditFolderDataAccessor collection class
Property Description

Count as Integer

Number of collection items

Item(index as Integer) as Object

Item at position specified by index; item is object of type AuditFolderData; index is zero-based (o...Count-1)

IndexOf(name as String) as Integer

Index of Audit folder specified by name within the collection.

This collection class is enumerable, i.e. it can be used in For Each loops within IDEAScript.

Properties of AuditFolderData metadata class
Property IDEA version Description

Name as String

10.0

Audit folder name

AuditType as Integer

10.0

Audit folder audit type (0 - Tax audit, 1 - annual audit)

AuditSubject as String

10.0

Audit folder audit area

FolderType As String

10.0

Audit folder type. Possible values are:
0 normal folder
1 multi-perod folder
2 VAT folder
3 VAT multi-period folder

IsMultiPeriodFolder as Boolean

10.0

True if the folder is multi-period, otherwise false

IsVATFolder as Boolean

10.0

True if the folder is VAT, otherwise false

RelatedFoldersList as Object

10.0

Audit folder related folders. Property is collection of type AuditFolderDataAccessor described above.

HasPeriod as Boolean

10.0

Specifies whether audit folder has period

Periods As Object

10.0

Audit folder period. The object has two properties:

From As Date
To As Date

PeriodStartDay as Integer

10.0

Period start day. In case of no period 0 is returned.

PeriodStartMonth as Integer

10.0

Period start month. In case of no period 0 is returned.

PeriodStartYear as Integer

10.0

Period start year. In case of no period 0 is returned.

PeriodEndDay as Integer

10.0

Period end day. In case of no period 0 is returned.

PeriodEndMonth as Integer

10.0

Period end month. In case of no period 0 is returned.

PeriodEndYear as Integer

10.0

Period end year. In case of no period 0 is returned.

HasBusinessYear as Boolean

10.0

Specifies whether audit folder has a business year.

BusinessYear As Object

10.0

Audit folder business year. The object has two properties:

From As Date
To As Date

BusinessYearStartDay as Integer

10.0

Business year start day. In case of no period 0 is returned.

BusinessYearStartMonth as Integer

10.0

Business year start month. In case of no period 0 is returned.

BusinessYearStartYear as Integer

10.0

Business start year. In case of no period 0 is returned.

BusinessYearEndDay as Integer

10.0

Business year end day. In case of no period 0 is returned.

BusinessYearEndMonth as Integer

10.0

Business year end month. In case of no period 0 is returned.

BusinessYearEndYear as Integer

10.0

Business year end year. In case of no period 0 is returned.

LinkedCIRId as String

10.1

ID of Import Routine associated with the audit folder. Returned like string representation of GUID without curly brackets.

LinkedCIRName as String

10.1

Name of the import routine associated with the audit folder.

Example

Sub Main() 
Dim mc As Object
Dim sc As Object
Dim caseAdmin As Object
Dim folders As Object
Dim data As Object
Dim txt As String
Dim cnt As Integer

Set mc = SmartContext.MacroCommands
Set sc = mc.SimpleCommands
Set caseAdmin = mc.ProjectAdministration
Set folders = caseAdmin.EnumerateAuditFolders(3) '3 - get all data details
Set cnt = folders.Count

For i = 0 To cnt - 1
Set data = folders.Item(i)
Set txt = sc.FormatString("Name:{0}; Audit type:{1}; Audit area:{2}; folder type:{3}",
data.Name, data AuditType, data.AuditSubject, data.FolderType)
SmartContext.Trace txt
Set txt = sc.FormatString (" From {0:dd.MM.yyyy} to {1:dd.MM.yyyy}",
data.Periods.From, data.Periods.To)
SmartContext.Trace txt
Set txt = sc.FormatString (" Number of related folders: {0}",
data.RelatedFoldersList.Count)
SmartContext.Trace txt

Next
Set data = Nothing
Set folders = Nothing
Set caseAdmin = Nothing
Set sc = Nothing
Set mc = Nothing

End Sub
EnumerateAuditFolders | Caseware Docs