Skip to main content

TURL_SetPassword (function reference)

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

TURL_SetPassword

Sets the password to be used for password protected URLs.

SyntaxFunction badge

TURL_SetPassword ( switches ; password )

Parameters

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

Returned Result

Data type returned

Error code

Result

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

Compatibility

FileMaker Pro 16 to 19

Considerations

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

The maximum length of a password is 1 Gb.

Example

TURL_SetPassword ( "-unused" ; "Als ik zo vrij mag zijn" )

This will set the password to “Als ik zo vrij mag zijn”.

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" ; "http://www.mtvc.nl/" ) ]
	# forget the user name and password
	Set Field [ gErrorCode ; TURL_SetUserName ( "-unused" ;  "" ) ]
	Set Field [ gErrorCode ; TURL_SetPassword ( "-unused" ;  "" ) ]
End if

Related functionFunction badge

TURL_SetUserName

Related topics

Troi URL Plug-in online help (overview)


Online Help Page for Troi URL Plug-in for 16 to 19 –> TURL_SetPassword (urlp4403) 2021-1013 16:35:12