Legacy Automation package

The actions in the Legacy Automation package are only used in migrated bots to ensure that they run seamlessly in Automation 360. We do not recommend using this package for new bot development.

Note: If you built a bot using actions from the Legacy Automation package from Build 5322 or earlier, the actions will be missing when you open the bot with the default package version. You must reinsert the actions and repopulate the fields.

Expressions

Expressions appear in action input fields. This package has the following expressions:

Expression Description Use example
DictionaryToString Converts a dictionary variable to a string variable {{$dictionaryVar.LegacyAutomation:dictionaryToString$}}

The output is a string variable with the following value: {key1,value1},{key2,value2}

GetAbsolutePath Provides you the relative path of all (non-Automation Anywhere) files present on your system by having a global variable at the start of the path. In Enterprise 11 or Enterprise 10, the equivalent of GetAbsolutePath is present at Tools > Options > Runtime Settings > Start in path of task.

In Enterprise 11 or Enterprise 10, any folder in the repository can be used as a starting path for the GetAbsolutePath value. If the path in the Enterprise 11 or Enterprise 10 bot is an absolute path, the migration process does not make any change to the migrated bot. If the path in the Enterprise 11 or Enterprise 10 bot is a relative path and contains a variable, the migration process adds a global variable at the start of the path as prefix alongside the relative value path.

  • variable.txt: The input provided in this example is a relative path, and the output will be C:\testing\variable.txt, where, C:\testing\variable.txt is a start-in path.
  • \\datashare\variable.txt: The input provided in this example is a network path, and the output will be \\datashare\variable.txt.
  • D:\testing\Automation Anywhere Files\Automation Anywhere\My Docs\mydoc.docx: The input provided in this example is an absolute path, and the output will be D:\testing\Automation Anywhere Files\Automation Anywhere\My Docs\mydoc.docx.
GetBotPath Modifies the value of the bot path variable in the Enterprise 11 or Enterprise 10 bots and replaces it with the relative bot path according to the Automation 360 repository. The value of the bot path is based on the ApplicationPath of the local path or network path.
  • D:\testing\Automation Anywhere Files\Automation Anywhere\Bots\My Tasks\test.atmx: The input provided in this example is an absolute path, and in this case, the output path will be My Tasks/test.
  • $AAApplicationPath$\Automation Anywhere Files \Automation Anywhere\Bots\My Tasks\test.atmx: The example provided in this input is related to $AAApplicationPath$, and the output will be My Tasks/test.
  • \\Automation Anywhere Files\Automation Anywhere\Bots\My Tasks\test.atmx: The example provided in this input is a network path, and the output will be My Tasks/test.
GetDecrementedNumber Decrements the value of the respective variable by 1. It is used mostly in the index positions of list, record, array or table variables. $myArray[$Loop-Counter-1.LegacyAutomation:getDecrementedNumber$][0]$

The output of myNumber decreases by 1 with each iteration of the loop.

GetIncrementedNumber Increments the value of the respective variable by 1. It is used mostly in the index positions of list, record, array or table variables. $Loop-Counter-1.LegacyAutomation:getIncrementedNumber.Number:toString$The output of myNumber increases by 1 with each iteration of the loop.
GetKeystrokeCount Calculates the values of keystrokes in a phrase/text
Note: A special character, such as [TAB], [END], or [PAGE DOWN], is counted as one keystroke.
$KeyStroke-CharLength.LegacyAutomation:getKeystrokeCount.String:toNumber$

The output is the average delay for each keystroke.

GetLegacyIndexValue Retrieves the value from the specific index position of the list variable in the bots migrated from Enterprise 11 or Enterprise 10. If the index position is greater than the size of the list variable, the system retrieves the value from the first index position of the list in the migrated bots
ListToString Converts a list variable to a string variable. {{$listVar.LegacyAutomation:listToString$}}

The output is a string variable with the following value: value1,value2,value3

ListToTable Converts a list variable to a table variable. {{$my-list-variable.LegacyAutomation:listToTable$}}

The output is a table variable where each list value is cell in a single column.

ParseLegacyKeys Ensures that the Insert Key Stroke command of the Enterprise 10/Enterprise 11 bots stored in variables is successful upon execution. This expression converts them into equivalent Automation 360 key strokes during the execution.
Note: The appearance of some special characters differs between Version 11.3 and Automation 360. For example, the Page Up key appears as [PAGE UP] in Version 11.3 and [PAGE-UP] in Automation 360. This difference does not impact bot function.
$Test.LegacyAutomation:parseLegacyKeys$
ParseVariableOperation Parses the expression provided in the Enterprise 10/Enterprise 11 Variable Operation command. This expression ensures that Automation 360 returns the same output as Enterprise 10/Enterprise 11 bots upon execution. $prompt-assignment.LegacyAutomation:parseVariableOperation$
TableToString Converts a table variable to a string variable.

You can also use delimiters such as a colon, semicolon, or space to separate the values of the string variable in the output.

{{$tableVar.LegacyAutomation:tableToString$}}

The output is a string variable with the following value: {value1,value2},{value3,value4}

Use a colon, semicolon, or space as <"delimiter">:

{{$tableVar.LegacyAutomation:tableToString(<"delimiter">)$}} For example:
{{$tableVar.LegacyAutomation:tableToString(":")$}}

The output is a string variable with the following value: {value1:value2}:{value3:value4}

TableToList Converts a table variable to a list variable. {{$DataTable.LegacyAutomation:tableToList(<column_index>)$}} For example: {{$DataTable.LegacyAutomation:tableToList(2)$}}

The output is a list variable with the following value: [value1,value2,value3]

StringToList Converts a string type variable to a list type variable $SampleString.LegacyAutomation:stringToList$

The output is a list variable of size 1 with value same as "SampleString"

StringToTable Converts a string type variable to a data table type variable $SampleString.LegacyAutomation:stringToTable$

The output is a data table variable with size (1*1) and value at index [0,0] same as SampleString