CasewareDocs

SmartFromToList

Properties:

Remarks

  • If the account number length is greater than null, this value has to be used.
  • If the value is zero and an existing parameter name is provided, the value of this parameter will be used.
  • If the account number length is zero and no parameter name is provided, nothing happens and the input values will be taken as they are.
  • If the account number length is zero and a parameter name is provided but not available, nothing happens and the input values will be taken as they are. A log entry documents this issue.
  • If the field data type is numeric, zero-padding shall not be done.

Example

Sub Main() 
Const FromValue = 0
Const ToValue = 1

Dim oParameters As Object
Dim oFromToList As Object
Dim vList As Variant
Dim vRow As Variant
Dim s As String

'Get parameters from SmartContext.
Set oParameters = SmartContext.Parameters

If oParameters.Contains("SmartFromToList1") Then
s = "The SmartFromToList1 control delivers" & Chr(13)

Set oFromToList = oParameters.Item("SmartFromToList1")

vList = oFromToList.GetList
For Each vRow In vList
sDateFrom = Format(DateValue(vRow(FromValue)), "yyyymmdd")

If vRow(ToValue) = " " Then
sDateTo = sDateFrom
Else
sDateTo = Format(DateValue(vRow(ToValue)), "yyyymmdd")
End If

s = s & sDateFrom & "..." & sDateTo & Chr(13)
Next

MsgBox s

Set oFromToList = Nothing
Set oParameters = Nothing
End If
End Sub
SmartFromToList | Caseware Docs