Skip to main content
Workday User Guide
Last Updated: 2023-06-23
URL_PROTOCOL

URL_PROTOCOL

Description

URL_PROTOCOL
is a row function that returns the protocol (or URI scheme name) portion of a URL string.

Syntax

URL_PROTOCOL
(
URL_string
)

Return Value

Returns the protocol portion of a URL as a
TEXT
value, or
NULL
if the input string is not a valid URL.
For example, in the string
http://www.workday.com
, the protocol portion is
http
.
In the string
ftp://ftp.workday.com/articles/workday.pdf
, the protocol portion is
ftp
.

Input Parameters

URL_string
Required. A field or expression that returns a
TEXT
value in URI (uniform resource identifier) format of:
protocol
:
authority
[/
path
][?
query
][#
fragment
]
The protocol portion of a URL consists of a sequence of characters beginning with a letter and followed by any combination of letter, number, plus (
+
), period (
.
), or hyphen (
-
) characters, followed by a colon (
:
). For example:
http:
,
ftp:
,
mailto:

Examples

Return the protocol portion of URL string values in the
referrer
field:
URL_PROTOCOL([referrer])
Return the protocol portion of the literal URL string:
URL_PROTOCOL("http://www.workday.com")
returns
http
.