TRY_TO_FILE

A version of TO_FILE that returns NULL instead of raising an error.

Syntax

Use one of the following:

TRY_TO_FILE( <scoped_url> )

TRY_TO_FILE( <metadata> )

Arguments

scoped_url

A valid scoped file URL.

metadata

An OBJECT containing all the required FILE metadata.

Returns

A FILE, or NULL.

Usage notes

Returns NULL when:

  • The supplied URL is not validL.

  • The file is on a stage that the user has no permissions to access.

  • The supplied metadata doesn’t contain the required FILE fields.

Examples

See TO_FILE.