Skip to main content

Dial_SetLabels (function reference)

By November 1, 2020June 23rd, 2021Online Help, Troi Dialog Plug-in
Troi Dialog Plug-in for FileMaker Pro

Dial_SetLabels

Sets the label text to be displayed next to the input fields of the next input dialog.

SyntaxFunction badge

Dial_SetLabels ( switches ; label1 ; label2 ; label3 ; ... ; label20 )

Parameters

switches not used, reserved for future use. Leave blank or put "-Unused"
label1…label20 the text that will be used as labels for the input fields 1 to 20

Returned Result

Data type returned

Error code

Result

An error code. Currently the plug-in always returns 0.

Originated in

Troi Dialog Plug-in 3.0

Compatibility

FileMaker Pro 16 to 19

Considerations

The labels of the input fields are saved by the plug-in until they are set again. So you only have to set them once if you want to use the same labels for multiple dialogs. When the FileMaker application stops, the labels are reset to “”.

If you have less than 20 fields for the next dialog box you just specify the labels you need.

Note that for checkbox fields the label is put to the right of the checkbox.

Example

Set Field [ gErrorCode ; Dial_SetLabels ( "-Unused" ; 
			"Name" ; "Address" ; "City" ; "Zip" ; "Country" ; ) ]

This will set the labels for fields 1 to 5.

Example 2

This example will set the labels from a field, this makes it easy to translate a dialog to a different language. We assume that in your FileMaker file the following fields are defined:

gErrorCode     			Global, text
gLabel1 ... gLabel20    	Globals, text

Add the following script step:

Set Field [ result ; Dial_SetLabels ( "-Unused " ; gLabel1 ; gLabel2 ; gLabel3 ; 
				gLabel4 ; gLabel5 ; gLabel6 ; ... ; gLabel20 ) ]

Used in example file

Input.fmp12

Related functionsFunction badge

Dial_InputDialog
Dial_SetInput

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 16 to 19 –> Dial_SetLabels (dialp4313) 2021-0623 15:56:06