I am very new to UiPath and had a question about conditional if/then statements.
I have a large excel file (93,600 rows) of data. The columns are Employee Name, Manager Name, Report Submission Date (mm/dd/yyyy hh/mm/ss), Report Name, Purpose, City, Expense Type, Transaction Date (mm/dd/yyyy hh/mm/ss), vendor, payment type, personal expense, and expense amount.
I am going to load this dataset into UiPath and then run a series of tests on this data. I want to run tests like
If Expense Type = (âParkingâ) AND Expense Amount > $50
If Payment Type <> Cash AND Expense Type does not contain (âAirâ)
IF report date>transaction date by 15 days
For the Then condition, I want to export these rows into a new table, then for the else condition, I want to leave the rows where they are.
Excellent use of UiPath! Iâm having some trouble converting it to my usage though. On the assign variables sequence, there is a variable there that is not working. For Transaction date, it is giving me the following error:
Cannot assign from type âSystem.Stringâ to type âUiPath.Core.GenericValueâ in Assign activity â Assignâ.
In the data table, there is no column titled TransactionDate, I had to add a space between the two words to get UiPath to recognize the column.
The code I am using for the value of the assign activity is: row(âTransaction Dateâ).ToString
Itâs obvious that itâs not working because the Transaction Date variable is not a string but rather a datetime. Iâm adding a screen clipping of the Transaction Date variable.
I tried changing the variable type to a DateTime variable and I also tried removing .ToString from the actual assign coding.
Neither of them worked and the new error I am getting is:Cannot assign from type âSystem.Objectâ to type â System.DateTimeâ in Assign Activity âAssignâ