ENCODEURL Function: Difference between revisions
From Planfix
(→Go To) |
No edit summary |
||
| Line 83: | Line 83: | ||
== Format == | == Format == | ||
'''ENCODEURL'''("link") | '''ENCODEURL'''("link") | ||
'''URL.CODE'''("link") | '''URL.CODE'''("link") | ||
| Line 98: | Line 96: | ||
<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. | ||
Revision as of 13:37, 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.