CasewareDocs

GetAuditFolderData

Returns meta data for a specified audit folder within current IDEA working folder.

Compatibility

Available as of IDEA version 10.0

Syntax

GetAuditFolderData(folderName as String, dataScope as Integer) as Object

Parameters

folderName

Name of the folder

dataScope

Specifies level of meta data details delivered by the method. Possible value are:

Level of metadata
Value Explanation
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
4 associated Standard Import Routine ID and name
3 all (basic data + period data + related folders)

Return Value

Meta data for the specified audit folder as AuditDataFolder object. If audit folder with the specified name does not exist within the current IDEA working folder, Nothing is returned.

Example

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

Set mc = SmartContext.MacroCommands
Set sc = mc.SimpleCommands
Set relFs = afd.RelatedFoldersList
Set cnt = relFs.Count
Set txt = sc.FormatString("{0};{1};{2};{3:MM_dd_yyyy};{4:MM_dd_yyyy}",
afd.AuditSubject, afd.Name, afd.FolderType, afd.Periods.From, afd.Periods.To)
SmartContext.Trace txt

'Loop over related folders
For Each relFolder in relFs
Set data = relFs.Item(i)
Set txt = sc.FormatString("Related folder; Name:{0}; Audit area:{1}; type:{2}",
data.Name, 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
Next
Set data = Nothing
Set relFs = Nothing
Set caseAdmin = Nothing
Set sc = Nothing
Set mc = Nothing
End Sub

Sample script for obtaining associated Standard Import Routine information

Sub Main
Dim mc As Object
Dim sc As Object
Dim caseAdmin As Object
Dim afd 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 afc = caseAdmin.GetAuditFolderData ("FinAcc_2011", 4) '4 - linked CIR
If "{" & fldr.LinkedCIRId & "}" = SmartContext.TestId Then
SmartContext.Trace "Executed CIR is linked to Audit Folder 'FinAcc_2011'"
End If 
Set data = Nothing
Set caseAdmin = Nothing
Set sc = Nothing
Set mc = Nothing
End Sub