In PRA process, you often work with different kinds of data. Strings, numbers, and lists are the building blocks you will rely on as you design workflows that read, transform, and act on information. Understanding how data is expressed and manipulated is foundational for building reliable automation.
Strings: expressing textual data
A string is a sequence of characters that represents text. In many RPA tasks, strings are used to capture names, messages, emails, file paths, and other human-readable information. Treat strings as the basic unit for any textual operation. You may perform tasks such as concatenation (joining strings), slicing (taking a portion of a string), searching for substrings, or replacing parts of text.
For example, if you need to compose a greeting for a customer, you might combine the word “Hello” with the customer’s name stored as a string variable. When you interact with applications, such as extracting a username from a login screen or parsing a message, you’ll be manipulating string data frequently. Keep in mind that strings are inherently text-focused; numeric operations on strings require explicit conversion to numbers if your workflow demands arithmetic, comparisons, or sorting based on numeric value.
Numbers: the language of arithmetic
Numbers represent quantitative data. They support operations like addition, subtraction, multiplication, and division, as well as comparisons (greater than, less than, equal to). In RPA, numeric data enables you to compute totals, track counts, gauge performance metrics, or implement thresholds for decision-making.
There are two common categories to be aware of: integers and decimals (floating-point numbers). Depending on your tool, you may also encounter more specialized numeric types, such as decimal places or currency formats. When performing calculations, ensure that your numbers are in the appropriate type and unit. For example, if you are calculating the total price of items, you would multiply the quantity by the unit price and then sum across items. If you receive numeric data as text (for instance, from a CSV), you may need to convert it from string to a numeric type before performing arithmetic.
Lists: containers for data
A list is a collection that can hold multiple items, which may be of the same type or a mix of types depending on the language or tool. Lists are particularly convenient in RPA for grouping related data, such as a set of product names, a batch of customer IDs, or a sequence of steps to process.
Consider the example list: ["Apple","Banana","Pineapple","Orange","Grape"]. This demonstrates how a simple collection of strings can be organized for processing. Lists make it easy to iterate, filter, or transform data in bulk. In many RPA scenarios, you will encounter shortcut methods to input lists quickly. For instance, there might be convenient ways to enter a list directly in your workflow editor, or to generate a list from data sources like spreadsheets, databases, or web pages.
Accessing elements within a list
Two common ways to retrieve data from a list are by position (index) and by order. When you access elements by index, you start at 0 or 1 depending on the tool’s convention. For example, in a list ["Apple","Banana","Pineapple","Orange","Grape"]:
In forward (ascending) order, “Apple” sits at index 0, “Banana” at index 1, and so on.
In reverse (descending) order, if you count from the end, the last item “Grape” might be index -1, “Orange” index -2, and so on, depending on how the tool defines negative indexing.
These concepts of forward and reverse access are especially useful when you want to select items from either end without knowing the exact positions, or when you need to apply operations to a subset of the list.
Using lists with loops
Lists are frequently paired with loops in automation. A loop can process each element in a list one by one, which is ideal for tasks like validating items, transforming data, or performing actions for each data point. For example, you might loop through a list of fruit names to log them, check inventory, or send personalized messages. When combining lists with conditionals, you can easily apply different logic to items that meet specific criteria.
Practical tips for working with data expressions
Always recognize the type of data you are handling. Strings, numbers, and lists each have their own operations and methods. Distinguishing among them helps you select appropriate actions and avoid errors.
When extracting data from external sources (like spreadsheets or databases), be mindful of the data’s original type. Text that looks numeric may require conversion to a numeric type before arithmetic.
Take advantage of convenient list inputs. If your automation environment offers shorthand methods to define lists, use them to keep your workflow clean and readable.
Use indexing thoughtfully. Remember that the position of data within a list is essential when performing lookups or slicing. If your tool supports negative indexing, you can leverage it to access items from the end of the list easily.
Combine data types to solve real problems. For instance, you may join a string (a customer name) with a number (an order total) to construct a personalized message, or you may convert a list of numeric strings into numbers to compute a sum.
Conclusion
Mastering the expression of data in RPA—strings for text, numbers for arithmetic, and lists as data containers—gives you the flexibility to design robust and scalable automations. By understanding how to access, transform, and combine these data types, you can create workflows that read data accurately, perform calculations reliably, and process collections efficiently. As you practice, you’ll gain intuition about when to use each data expression and how to structure your steps for clarity and maintainability.
