CasewareDocs

Set4App

Sets extended parameters specified by name and value for the currently active app workflow (in whose context the audit test / Standard Import Routine is executed.

Compatibility

Available as of IDEA version 10.0

Syntax

Set4App(paramName As String, paramValue As Object, [optional] location As Integer)

Parameters

paramName

Extended parameter name

paramValue

Extended parameter value. Can be one of the following types: Integer, String, Float, Date, Period, Object

location

[optional] Place where the databases are located(desktop or server).

UseContext = 0 represents the current behavior.

Desktop = 1 stores always on desktop (ignored on server).

Server = 2 stores data always on the server.

Remarks

If the parameter specified by paramName does not exist, all Save4XXX commands will create it.

If the parameter specified by paramName already exists, all Save4XXX commands will overwrite its value with a new one.

Example

Sub Main()
Dim mc As Object
Dim sc As Object
Dim parmeterizer As Object
Dim Period As Object
Dim startDate As Date
Dim toDate As Date

Set mc = SmartContext.MacroCommands
Set sc = mc.SimpleCommands
Set parameterizer = mc.GlobalParameters

'Setting string value for primary input file
parameterizer.Set4File SmartContext.PrimaryInputFile, "StringVal", "HaHaHa"

' Setting integer value for the audit folder
parameterizer.Set4AuditFolder "2015_0603", "IntVal", 100

' Setting string value for the audit folder
parameterizer.Set4AuditFolder "2014_0603", "StringVal", "Some String"

' Setting date value for the current project
startDate = DateSerial(2000, 1, 1)
parameterizer.Set4Project "DateTimeVal", startDate

' Setting period value for the current app workflow
toDate = DateSerial(3000, 1, 1)
Set Period = sc.CreatePeriod(startDate, toDate)
parameterizer.Set4App "PeriodVal", Period

' Setting float value for machine/company
parameterizer.Set4Machine "FloatVal", 123.45
End Sub