GetAuditFolders
Returns the list of audit folders within the current IDEA working folder. Each audit folder within the list is represented by a descriptor object of type AuditFolderData (meta data object).
Compatibility
Available as of IDEA version 10.0
Syntax
GetAuditFolders(dataType as Integer) as Object
Parameters
dataType
Specifies level of meta data details delivered by the method. Possible value are:
| Level | 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 AuditDataFolder objects. Collection is represented by the class AuditFolderDataAccessor.
Remark
On server the returned collection is always empty.
| Propertiy | Description |
|---|---|
| Count as Integer | Number of collection items |
| Item (index as Integer) as Object | Item at position specifies 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. |
| Property | Description |
|---|---|
| Name As String | Audit folder name |
| AuditArea As String | Audit folder audit area |
| FolderType As String | Audit folder type. Possible values are: 0 normal folder 1 multi-period folder 2 VAT folder 3 VAT multi-period folder |
| Periods As Objects | Audit folder period. The object has two properties: From As Date To As Date |
| IsMultiPeriodFolder As Boolean | True if folder is multi-period, otherwise false. |
| IsVATFolder As Boolean | True if folder is VAT, otherwise false. |
| RelatedFoldersList As Object | Audit folder related folders; property is collection of type AuditFolderDataAccessor |
Example
Sub Main()
Dim mc As Object
Dim sc 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 folders = sc.GetAuditFolders(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 area:{1}; type:{2}",
data.Name, data.AuditArea, 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 sc = Nothing
Set mc = Nothing
End Sub