This article covers the demonstration of execution of other formulas when a text or URL is passed in the formula mode.
What you'll need:
Skill level: Intermediate
Time required: 5 minutes
- Skills for understanding bas64 content
Let's take an example text Hello world and tweak it using the following formulas:
- encodeUrl
- decodeUrl
- encodeBase64
- decodeBase64
- pluck
- findAndReplace
- join
- last
1) encodeUrl
This formula encodes the provided string input in the URL format:
Output:
2) decodeUrl
This function helps decode the provided string from URL format to plain text format:
Output:
3) encodeBase64
Encodes the given plain text string text using the base64 algorithm:
Output:
4) decodeBase64
Decodes the given base64 text string to its original plain text format using the base64 algorithm. Let's decode the above base64 result:
Output:
5) pluck
This function helps in extracting a list of specific properties from each item/element present in an array. It comes with a syntax .pluck("")
. Within the double quotes, specify the key element present in an array of which details you want to retrieve:
Output:
6) findAndReplace
This function finds an existing string and replaces it with a newly specified string. It comes with a syntax .findAndReplace("","")
. Specify the existing string data within the first double quotes, which should be searched, and the new string data in the second double quotes which should replace the old string data:
Output:
Note: The data you want to replace must exist in the input specified.
7) join
This function helps to join different string elements and convert them to a single string. The elements that need to be joined need to be mentioned in an array are separated by a specified separator. The default separator is a comma (,). The syntax is .join("")
. Within the double quotes, you need to specify the separator using which the elements of the array will be joined. Here we have used space as a separator:
Output:
Note: The separator used is a space. If a separator is not defined within the double quotes, all the elements in an array will merge together.
8) last
As the name suggests, this function returns the last element of an array:
Output:
Comments
0 comments
Please sign in to leave a comment.