Text control

The Text control is a simple text box that can accept arbitrary input, and has the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the script template.

Title. An optional title that appears above the control. For multi-line titles, use \n to specify line breaks.

Title Position. Specifies the position of the title relative to the control. Values are Top and Left where Top is the default.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key].

Text Content. Specifies whether the contents are arbitrary or whether the text box must contain a string that adheres to rules for IBM® SPSS® Modeler field names.

Default Value. The default contents of the text box.

Width. Specifies the width of the text area of the control in characters. The allowed values are positive integers. An empty value means that the width is automatically determined.

Required for execution. Specifies whether a value is required in this control in order for execution to proceed. If True is specified, the user of the node dialog must specify a value for the control otherwise clicking the OK button will generate an error. If False is specified, the absence of a value in this control has no effect on the state of the OK button. The default is False.

Script. Specifies the R script or Python for Spark script that is generated and run by this control at run time and can be inserted in the script template.

  • You can specify any valid R script or Python for Spark script. For multi-line scripts or long scripts, click the ellipsis (...) button and enter your script in the Script Property dialog.
  • The value %%ThisValue%% specifies the run time value of the control, which is the content of the text box. This is the default.
  • If the Script property includes %%ThisValue%% and the run time value of the text box is empty, then the text box control does not generate any script.
Quote Handling. Specifies handling of quotation marks in the run time value of %%ThisValue%% when the Script property contains %%ThisValue%% as part of a quoted string. In this context, a quoted string is a string that is enclosed in single quotation marks or double quotation marks. Quote handling applies only to quotation marks that are the same type as the quotation marks that enclose %%ThisValue%%. The following types of quote handling are available.
Python
Quotation marks in the run time value of %%ThisValue%% that match the enclosing quotation marks are escaped with the backslash character (\). For example, if the Script property is '%%ThisValue%%' and the run time value of the text control is Text box's value, then the generated script is 'Text box\'s value'. Quote handling is not done when %%ThisValue%% is enclosed in triple quotation marks.
R
Quotation marks in the run time value of %%ThisValue%% that match the enclosing quotation marks are escaped with the backslash character (\). For example, if the Script property is '%%ThisValue%%' and the run time value of the text control is Text box's value, then the generated script is 'Text box\'s value'.
None
Quotation marks in the run time value of %%ThisValue%% that match the enclosing quotation marks are retained with no modification.

Enabling Rule. Specifies a rule that determines when the current control is enabled. Click the ellipsis (...) button to open the Enabling Rule dialog box and specify the rule. The Enabling Rule property is visible only when other controls that can be used to specify an enabling rule exist on the canvas.