ENCODEURL Function

From Planfix
Jump to: navigation, search

The ENCODEURL() function returns a URL-encoded string, with some non-alphanumeric symbols replaced by a percent (%) sign and a hexadecimal number:

IN OUT
! %21
# %23
$ %24
% %25
& %26
' %27
( %28
IN OUT
) %29
* %2A
+ %2B
, %2C
/ %2F
: %3A
IN OUT
; %3B
? %3F
@ %40
[ %5B
] %5D
%20

It is used for cases where it is necessary to form a working link in a calculated field or to calculate the value of a field with a script action.

Format

ENCODEURL("link")

URL.CODE("link")

Examples

Example № 1:

"https://site.com/?param="+ENCODEURL({{Task.Name}})
https://site.com/?param=%D0%9D%D0%B0%D0%B7%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5%20%D0%B7%D0%B0%D0%B4%D0%B0%D1%87%D0%B8


Example № 2:

ENCODEURL("http://contoso.sharepoint.com/teams/Finance/Documents/April Reports/Profit and Loss Statement.xlsx")
http%3A%2F%2Fcontoso.sharepoint.com%2Fteams%2FFinance%2FDocuments%2FApril%20Reports%2FProfit%20and%20Loss%20Statement.xlsx

Important

Only links without special symbols can be added to the function, as in the examples above. Otherwise, the special symbol (for example, %) are replaced by their equivalents in the table. As a result, the link will no longer work.


Go To