SmartInputBox
Properties:
Defines if the control can be empty or not.
Alias of the logical input database associated with the control.
The tag ID or the field associated with the control.
The value type based on the tag.
| Constraint | Description |
|---|---|
| DefaultValue | The default value that will be used. |
| EnableDefaultValue | Enables the use of a default value. |
| Max | Maximum allowed length of a text. Maximum possible value is 32767. |
| Min | Minimum allowed length of a text. Minimum possible value is 0. |
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.
Defines if a control is optional or not, i.e. if the user has to set it or not.
Formatting of the output strings in the report. You can use the following settings: true/false, yes/no; default value selected/unselected).
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.
Defines whether or not the output of the control is stored when the parent dialog is closed. Its default value is "True". In case this property is set to "False" the save routine of SmartAnalyzer is not storing the data entered into the corresponding input control."True" means the data will be stored and is available when opening the dialog a second time. 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.
If set to true the control will be shown in the report. 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.
The list of tags that will enable or disable the control. The list of tags will be added based on the following schema: <input database alias>^<tag ID>. 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.
The type of value a user can enter.
Properties which can be used in the macro/routine:
Provides the user input value in its original Visual Basic type(integer values are provided as double values).
| Value | Description |
|---|---|
| String | No change |
| Numeric | As it was entered but as string |
| Decimal | This value will be converted into a string. |
| Date | This value will be provided as an IDEA date format string. |
| Time | String in the time format of IDEA (HH:MM:SS). |
Example
Sub Main()
Dim oParameters As Object
Dim oInputBox As Object
Dim ReturnValueAsString As String
Dim ReturnValueAsDouble As Double
'Get Parameters from SmartContext
Set oParameters = SmartContext.Parameters
If oParameters.Contains("smartInputBox1") Then
Set oInputBox = oParameters.Item("smartInputBox1")
ReturnValueAsString = oInputBox.Text
ReturnValueAsDouble = oInputBox.Value
'Do something with the return values
End If
'Alternative way of getting the return value
ReturnValueAsString = oParameters.Item("smartInputBox1").Text
ReturnValueAsDouble = oParameters.Item("smartInputBox1").Value
'Do something with the return values
Set oInputBox = Nothing
Set oParameters = Nothing
End Sub