Modify Text
AutomatR.DefaultActivities.FileAndFolder.ModifyText
The "Modify Text" activity in AutomatR facilitates the modification of a text value through various operations, including find and replace, trimming, and text transformation. This activity is categorized under Text activities and enhances the flexibility of text manipulation within automation workflows.
Properties
Name | Description |
---|---|
Input | |
Text To Modify | Specifies the input text that needs to be modified. String variables containing the text value or the result of a text retrieval operation. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name. |
Text Modify | Selects the desired text modification action from the dropdown menu. Actions include trimming, converting to upper or lower case, find and replace, etc. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Modify Text" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the wait time is 1000 milliseconds or 1 sec, i.e., 1. |
Replace with New Text | Specifies the new text to be used for modification, applicable when the "Replace" operation is selected. String variables containing the replacement text. |
Search for Find Text | Specifies the text to search for and replace when the "Replace" operation is selected. String variables containing the text to find. |
Output | |
Result | Outputs the result of the text modification operation in string format. Variables of type string to store the modified text result. |
How to use:
- Drag and drop the "Modify Text" activity onto the workflow.
- Configure the properties by specifying the text to be modified and selecting the desired modification action.
- Optionally, configure additional properties based on the selected modification action.
- Execute the workflow to perform the specified text modification.
Example: Consider an example where the "Modify Text" activity is used to trim and convert a text to uppercase:
Modify Text:
Text To Modify: " Hello, World! "
Text Modify: Trim
Result: modifiedText
In this example, the activity trims the leading and trailing spaces from the text " Hello, World! " and converts it to uppercase. The result, "HELLO, WORLD!", is stored in the modifiedText
variable for further handling in the workflow.