SmartFromToList
Properties:
Defines if an empty result can be returned.
Alias of the logical input database associated with the control.
The tag ID or the field associated with the control.
The caption of the control.
The caption of "From" label.
The caption of "To" label.
The value type a user can enter.
| Value | Description |
|---|---|
| DefaultValue | The default value that will be used. |
| EnableDefaultValue | Enables the use of a default value. |
| Max | Maximum allowed value for the control. Maximum possible value is: 999999999999999. |
| Min | Minimum allowed value for the control. Minimum possible value is: -999999999999999. |
If set to true, it means that the associated tags have to be interpreted as field names. This property is only available for IDEA version 10 or higher. Do not change it if you plan to use the dialog for a lower version of IDEA.
Length of the account number (default: 0).
Stores the name of the (global) parameter to be used (default: empty).
Alias of recommended databases used in the Input Assistance. This property is only available for IDEA version 10 or higher. Do not change it if you plan to use the dialog for a lower a lower version of IDEA.
Formatting of the output strings for the report.
The name for the control that will be displayed in the report.
The order in which the controls will be displayed in the reports. This property is only available for IDEA version 10 or higher. Do not change it if you plan to use the dialog for a lower version of IDEA.
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