Creating String Array Variables for analysis

Hello everyone,

Complete UiPath beginner (although i’m learning a lot) needing some help. So I have a database which I am attaching a sample of below.
dummy variables.xlsx (10.5 KB)

I am loading this into UiPath using an excel application scope. Then using a Read Range activity, I am reading a certain range and outputting it into a variable in UiPath.

I am then using a For Each Row activity to analyze the rows of this variable using a set of If activities to determine if an invoice row violates any of the rules. One such rule is trying to ensure that all airfare purchased will be expensed directly to our company account. To run this test, I use the following code:

Not row(“Payment Type”).ToString.Equals(“Company Paid”) And
row(“Expense Type”).ToString.Equals(“Airfare”) And
row(“Personal”).ToString.Equals(“N”)

This is saying that in the column, Payment Type, in each row that does not say “Company Paid”, it is a violation if the expense type = Airfare and Personal = N. This test works like a charm.

If a violation is determined, then that row is outputted into a new excel table.

I want to run a different test that determines what type of amenities an employee can purchase. We have Group A employees, Group B employees, and regular employees. Group A and B employees can upgrade to business class airfare. However, the employee group is not a column so I will need to add new variables for these groups of employees. I believe I would need to add array’s of strings that I can call in each test.

I want to run a test that determines if:
row(“Purpose”).ToString.Contains("Upgrade) AND
Employee <> Group A or B

This determines if the Purpose column contains the word “upgrade” AND the employee is not in group A or B. I need to manually add variables for Group A and B employees. How would I do that?

Thank you for any help you can provide!
@Palaniyappan @balupad14 @lakshman @HareeshMR @Shubham_Varshney

1 Like

In my dummy variables table, Willie Nelson is a Group A employe while Jane Jefferson is a regular employee. They both upgraded their tickets to their airfare but Jane Jefferson doing this is a policy violation. I want the robot to automatically detect this violation.

Hi @hall1570 - You can use Invoke workflow activites to do this inside your condition you can use than and as an argument you can pass data table into that and get things done for you. All of the logic of copy/paste can be in the new workflow.

Hope it will help you.

Best!!
Anmol