Skip to main content

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

NameDescription
Input
Text To ModifySpecifies the input text that needs to be modified. String variables containing the text value or the result of a text retrieval operation.
Misc
Display NameProvides 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 ModifySelects the desired text modification action from the dropdown menu. Actions include trimming, converting to upper or lower case, find and replace, etc.
Optional
DelaySpecifies 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 TextSpecifies the new text to be used for modification, applicable when the "Replace" operation is selected. String variables containing the replacement text.
Search for Find TextSpecifies the text to search for and replace when the "Replace" operation is selected. String variables containing the text to find.
Output
ResultOutputs the result of the text modification operation in string format. Variables of type string to store the modified text result.

How to use:

  1. Drag and drop the "Modify Text" activity onto the workflow.
  2. Configure the properties by specifying the text to be modified and selecting the desired modification action.
  3. Optionally, configure additional properties based on the selected modification action.
  4. 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.