Skip to main content

Dial_GetInput (function reference)

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

Dial_GetInput

Returns the contents of one of the input fields. This makes it easy to get the result without parsing.

SyntaxFunction badge

Dial_GetInput ( switches )

Parameters

switches specify which input data from the last dialog is returned

Switches

Switches can be set to:

-Text1 this will return the text of the first input field (from the top) from the last dialog
-Text2 this will return the text of the second input field (from the top) from the last dialog
-Text3 this will return the text of the third input field (from the top) from the last dialog

-Text20 this will return the text of the 20th input field (from the top) from the last dialog

Returned Result

Data type returned

Text

Result

The text of the specified input field, from the last dialog shown.

Originated in

Troi Dialog Plug-in 3.0

Compatibility

FileMaker Pro 16 to 19

Considerations

The text of the input field(s) is saved by the plug-in until a next dialog is displayed. Please be aware that each dialog function of the plug-in resets the text. Dialogs that have no input field(s) will set the text to “”. (This is to be able to extend the functionality of these functions in the future).

When the FileMaker application stops, the input data is reset to “”.

See also the function Dial_GetButton.

Example

Set Field [ gUsername ; Dial_GetInput ( "-Text1" ) ]

This will put the data of the first input field of the last dialog shown, for example “John”, in the global field gUserName.

Example 2

This example will show an an input dialog with 5 input fields. We use the Get-Input function to easily get the data out. We assume that in your FileMaker file the following fields are defined:

Name		Text
Address      	Text
City		Text
Zip		Text
Country    	Text
result     	Global, text

Add the following script steps:

Set Field [ result ; Dial_InputDialog ( "-NoteIcon" ; 5 ; 
			"Please enter your personal data:" ; "OK" ; "Cancel" ; ) ]
If [ Dial_GetButton ( "" ) = 1 ]
  Set Field [ Name ; Dial_GetInput ( "-text1" ) ]
  Set Field [ Address ; Dial_GetInput ( "-text2" ) ]
  Set Field [ City ; Dial_GetInput ( "-text3" ) ]
  Set Field [ Zip ; Dial_GetInput ( "-text4" ) ]
  Set Field [ Country ; Dial_GetInput ( "-text5" ) ]
End If

Example 3

This example will show a list dialog with 1 input field. We use the Get-Input function to easily get the data out. We assume that in your FileMaker file the following fields are defined:

FlavourChosen		Text
result     		Global, text

Add the following script steps:

Set Field [ result ; Dial_ListDialog ( "-NoteIcon" ; "Please select a fruit:" ; "OK" ; 
				"Cancel" ; "Help" ; "Stop" ;  "Apple|Pear|Lemon" ) ]
Set Field [ FlavourChosen ; Dial_GetInput ( "-text1" ) ]

Used in example file

Input.fmp12

Related functionsFunction badge

Dial_BigInputDialog
Dial_GetButton
Dial_InputDialog
Dial_ListDialog
Dial_SetInput

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 16 to 19 –> Dial_GetInput (dialp4305) 2021-0623 15:50:17