Previous Topic

Next Topic

InputCode - MaxBasic Function

InputCode(CodeType: String, Prompt: String[, Title: String, Default: String, Filter: String, FilterButtonVisible: Boolean, AllowInactive: Boolean, AllowEmpty: Boolean, UseExactMatch: Boolean]): String

Displays a prompt in a dialog box, User must input or select a correct Code or click a button, returns a string containing the contents of the Code box.

If the Code Type is a Category Code, and Prompt is an empty string (that is ""), the Prompt will be set to the Category Alias for the Category Code. To specify the Category Alias and some additional text use the ApplicationSetting function to retrieve the Category alias, for example:

InputCode("ICCAT1", ApplicationSetting("IC\Cat1Alias") & " - From")

If the User clicks OK or presses Enter, InputCode function returns what is in the look-up control (empty string "" if no value entered). If the User clicks Cancel or presses Esc, this function returns Null.

See MaxBasic Input Code Types for available codes.

InputCode function syntax has these named arguments:

Parameter

Description

Code Type

Required. String expression used to select the type of code to be entered.

Prompt

Required. String expression displayed as the message in the dialog box.

Title

Optional. String expression displayed in the title bar of the dialog box. If you omit title, the application name is placed in the title bar.

Default

Optional. Code displayed in the look-up control as the default response if no other input is provided. If you omit default, the look-up control is displayed empty.

Filter

Optional. Filter expression for limiting available master file codes.

Filter Button Visible

Optional. Determines if the filter button is available on the control. Defaults to True.

Allow Inactive

Optional. Determines if Display Inactive Records button is available on the control. Defaults to False.

Allow Empty

Optional. Determines if the Lookup can be cleared after a value has been selected. Defaults to False.

Use Exact Match

Optional. Determines if the Lookup can accept and return values not in the code list. Defaults to True.

See also Scripted Form InputCode method and Input Grid InputCode method.

In This Section

MaxBasic Input Code Types

See Also

Input Functions

Book Contents

Book Index