ENCODEURL Function: Difference between revisions
From Planfix
(Created page with "{{#seo: |title=ENCODEURL Function |titlemode=append |keywords=planfix, function, ENCODEURL |description=ENCODEURL Function }} The ENCODEURL() function returns a URL-encoded string, with some non-alphanumeric symbols replaced by a percent (%) sign and a hexadecimal number: <div style="display: inline-block; width: 100%; text-align: center;"> {| class="wikitable" style="width:30%; float: left; margin-right: 1%;" | '''IN''' | '''OUT''' |- | ! | %21 |- | # | %23 |-...") |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 83: | Line 83: | ||
== Format == | == Format == | ||
'''ENCODEURL'''("link") | '''ENCODEURL'''("link") | ||
'''URL.CODE'''("link") | '''URL.CODE'''("link") | ||
Line 98: | Line 97: | ||
<div style="display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: #333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px;">http%3A%2F%2Fcontoso.sharepoint.com%2Fteams%2FFinance%2FDocuments%2FApril%20Reports%2FProfit%20and%20Loss%20Statement.xlsx</div> | <div style="display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: #333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px;">http%3A%2F%2Fcontoso.sharepoint.com%2Fteams%2FFinance%2FDocuments%2FApril%20Reports%2FProfit%20and%20Loss%20Statement.xlsx</div> | ||
== Important == | == 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. | 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. | ||
Line 104: | Line 102: | ||
== Go To == | == Go To == | ||
*[[Standard functions| | *[[Standard functions | Standard operators and Planfix functions]] | ||
*[[Calculated fields]] | *[[Calculated fields]] | ||
*[[Reports]] | *[[Reports]] |
Latest revision as of 13:38, 15 February 2024
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.