Dial_GetInput (function reference)

By October 1, 2017 November 14th, 2018 Online 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

switchesspecify which input data from the last dialog is returned

Switches

Switches can be set to:

-Text1this will return the text of the first input field (from the top) from the last dialog
-Text2this will return the text of the second input field (from the top) from the last dialog
-Text3this will return the text of the third input field (from the top) from the last dialog

-Text15this will return the text of the 15th 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 12 to 17

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" ) ]

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 14 to 17 –> Dial_GetInput (dialp4305) 2018-1114 15:04:21