Defining selectFormat Functions
Learn to define selectFormat function.
The selectFormat
function provides the user with the possibility to select one or more formats (e.g. phone profile, trigger, query, default values etc). Define a Select-Function
selectFormat
for the desired field.
selectFormat({
formatType: 48,
includePublicFormats: true,
selectionMode: "multi"
});
Syntax
Name |
Type |
Description |
---|---|---|
|
int or string |
The unique field ID or XML name of the field to which the format name is copied. (default: fieldId for which this formatSelector is defined) |
|
int |
The number representing the type of formats to select from. You can find the format numbers in the
mm_fixcatno_custom.txt file (created by starting
mmba.exe with the |
|
bool |
If true formats from the current user are shown. (default: true) |
|
bool |
If true formats from other users are shown. (default: false) |
|
string |
The info area abbreviation for which a format should be shown (e.g. "MA" to list only formats defined for the Activity info area) |
|
int or string |
The unique field ID or XML name of the field that contains the info area abbreviation by which to filter. Only applied when filter is not set. Only formats defined for that info area is available. (Example in UPDATE_DEFAULT: Used for selecting the correct default values format in Question (F2) field Default Values. |
|
string |
The initially selected format(s). In case of multiselect the format names have to be semicolon-separated. (default: currently entered value of the field with id fieldId) |
|
string |
An optional string used for filtering the format by name (wildcards are supported), e.g. "My*" to list only formats whose name starts with "My". |
|
string |
If set to "multi" multiple formats can be selected. |
Examples
selectFormat({
formatType: 32
});
selectFormat({
formatType: 36,
includePublicFormats: true,
filter: "MA"
});
selectFormat({
formatType: 36,
includePublicFormats: true,
filterFieldId: 5,
selectionMode: "multi"
});