Applies to
String Tools Overview
With String Tools, you can take an existing string and make changes to it.
Compose Text
Use Compose Text to construct text over multiple lines using a combination of text and data references. This module is used in the template Expose Latest Row Comment in Smartsheet.
Compose Text Fields
- Enter Text: Enter a combination of text and data references to produce a piece of text.
Extract Text
Extracts a particular substring from a given string.
Extract Text Fields
- Text: A reference to the text to be extracted from
- Match Text: A string or reference to a string that should be found and extracted
In the image below the 'Extract Text' module was set up to reference the text 'A piece of text with seven words' in the Text field and 'text with' in the Match Text field.
Find Text
Extracts multiple matches and string positions of a substring from a given string.
Find Text Fields
- Text: A reference to the text to be searched/parsed.
- Match Text: The text to be found.
The image below shows the result of searching for the word 'text' in the referenced sentence 'A piece of text with seven words'. The module returns the result as an object for each result, in this case the word was just found once.
For each result the start and end character location of the text is returned as 'start' and 'finish'.
Lowercase
Returns a string as all Lowercase.
Lowercase Fields
- Text: The text that should be converted to lowercase
Uppercase
Returns a string as all Uppercase.
Uppercase Fields
- Text: The text that should be converted to uppercase
Replace Text
Performs a search and replace for a particular substring with a string.
Replace Text Fields
- Text: A reference to the text that should be searched and changed
- Match Text: The text that should be replaced
- Replace Text: The text to replace the matched text with
Size of String
Returns the size in characters of the string as a number.
Size of String Fields
- Text: A reference to the text to identify the number of characters in.
Word Count
Returns the number of words in the string.
Word Count Fields
- Text: The text to count the number of words in.
Split Text
Split a String into an array of SubStrings based on a delimiter and returns the result as an array.
Split Text Fields
- Text: A reference to the text that should be split
- Delimiter: The character, word or piece of text to split by
In the image below the text 'This is a piece of text' has been split using the delimiter 'piece'. Note that the word piece is removed from the results.
Trim String
Trim whitespaces off the end of a string.
Trim String Fields
- Text: The text to be trimmed
Validate Luhn
Validates that a number (given in a string) passes the Luhn Algorithm to validate an identification number. It routes the workflow to the left if validated and routes the workflow to the right if unvalidated.
Validate Luhn Fields
- Text: A reference to the text to be validated
Multiple Comments
Allows you to send multiple comments back based on a delimiter in the string, to make reading the response easier for the user.
Multiple Comments Fields
- Text: A reference to the text that should be sent in pieces
- Delimiter: The character or text to split by
- Delay: A delay between comments in sections
For instance if the referenced text is 'a book a bike a tree', the delimiter is 'a' and the delay is 2 then the workflow will send 'book' 'bike' 'tree' as three separate comments/messages with 2 seconds delay between them.