AppendText

This activity assists the user to append the additional input text to a specified text file,
either at the top or at the bottom of the page.

Technical Reference

 

 

 

 

 

INPUT

AppendType: This parameter enables the appending of the input text according to the following patterns:

AppendNext: Adds the input string at the end of the document.

AppendBefore: Adds the input string at the beginning of the document.

 

By default, it is chosen as “AppendNext” option.

ContinueOnSameLine: This parameter enables to append the input text in the same line after the existing text in the specified document.

 

You can check this box to enable that option. By default, it will be un-checked.

 

When left blank, this option will not be considered. 

FilePath: This parameter specifies to provide the “Path” of the input file where the text needs to be appended.

 

You can either hardcode the values in the “String” variable or pass the values as “String” datatype.

 

This parameter accepts values in “String” datatype.

InputString: This parameter specifies to provide the “input” text that needs to be written in the specified input document.

 

You can either hardcode the values in the “String” variable or pass the values as “String” datatype.

 

This parameter accepts values in “String” datatype.

 

 

 

 

 

 

MISC

DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

SkipOnError: Specify the "Boolean" value as "True" or "False."

 

True: Continue executing the workflow regardless of any errors thrown.

False: Halt the workflow if it encounters any errors.

None: If the option is left blank, the activity will, by default, behave as if "False" were chosen.

Version: It indicates the version of the feature being used.

 

OUTPUT

Result: It provides the ability to view the execution status of the activity. It returns values in "Boolean."

 

True: Indicates that the activity has been executed successfully without any errors.

False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

Represents mandatory fields to execute the workflow

Here’s an example of how the “AppendText” activity works –

In the following example, I am going to use the “Notepad” application where it
contains the python script. Using the text file, I am going to add an additional line
at the top of the document.

Steps to execute the bot:

1.       Create a new solution named “TextAutomation” or open an existing solution.

2.       Install the "TextAutomation" feature from the "Manage Features" menu.

3.       Drag and drop the "AppendText" activity onto the designer pane and set it
as the “Start Node.”

4.        Double click on the activity to provide the required inputs.

a.       Here I am providing the “FilePath” as the path of the python script saved in
the text file format.

b.       Moving to the “InputString” field and providing the value as “import sys” here,
which needs to be appended in the python script.

c.       Navigating to the “AppendType” in the properties section to choose the type
as “AppendBefore” as here the input string needs to be added at the top.

5.       Now, save and execute the workflow.

The bot will execute and appends the input string at the top of the specified
input text file.