Skip to main content

TURL_SetUserName (function reference)

By October 1, 2021October 13th, 2021Online Help, Troi URL plug-in
Troi URL Plug-in for FileMaker Pro


Sets the user name to be used for password protected URLs.

SyntaxFunction badge

TURL_SetUserName ( switches ; username )


switches not used, reserved for future use. Leave blank or put "-unused"
username the user name (this is case sensitive)

Returned Result

Data type returned

Error code


If successful this function returns 0. If unsuccessful it returns an error code starting with $$ followed by the error code.

At the moment this function does not return errors.

Originated in

Troi URL Plug-in 1.2


FileMaker Pro 16 to 19


The user name is remembered until you specify a different user name. If (for security) you want to remove a previously specified user name, call this function with an empty user name.
The user name is also removed when you quit FileMaker Pro.

The maximum length of a username is 255 characters.


TURL_SetUserName ( "-unused" ; "Tom Poes" )

This will set the user name to “Tom Poes”.

Example 2

This will set the user name and password and get a web page. We assume that in your FileMaker file the following fields are defined:

gUserName         	Global, text
gPassword         	Global, text

gUserName should contain the user name, for example “Olie B. Bommel” and gPassword should contain the password, for example “denkraam”. Add the following script steps:

Set Field [ gErrorCode ; TURL_SetUserName ( "-unused" ;  gUserName ) ]
If [ gErrorCode = 0 ]
	Set Field [ gErrorCode ; TURL_SetPassword ( "-unused" ;  gPassword ) ]
End if
If [ gErrorCode = 0 ]
	Set Field [ gResult ; TURL_Get ( "-NoDialog" ; "" ) ]
	# forget the user name and password
	Set Field [ gErrorCode ; TURL_SetUserName ( "-unused" ;  "" ) ]
	Set Field [ gErrorCode ; TURL_SetPassword ( "-unused" ;  "" ) ]
End if

Related functionFunction badge


Related topics

Troi URL Plug-in online help (overview)

Online Help Page for Troi URL Plug-in for 16 to 19 –> TURL_SetUserName (urlp4406) 2021-1013 16:38:02