Hi, I am new to uiPath. I am trying to write an if statement that if a value in an excel box exists, to show message “Customer has been billed”. The value is a date in the excel file that proves the customer was billed. For some customers, there is no value, hence I would write an if statement that “Customer has not been billed”
This is the link to the excel file https://docs.google.com/spreadsheets/d/1R3oQzv3ITf4fXR-uXpgWHZtk81gh_led/edit?usp=sharing&ouid=104054591438406330937&rtpof=true&sd=true
This is the link to my uiPath Studio project. The beginning is where I need help https://drive.google.com/file/d/1m4JzDH-NLwYbWUkASTzewXwk03n2169k/view?usp=sharing
Read the Input excel file. store it in the DT variable.
Use For each row in DT and if activity
This the code need to modified
Hey Gokul. I am getting the error Error: ERROR Validation Error Compiler error(s) encountered processing expression “CurrentRow(“Billed”).ToString=”“”.
‘CurrentRow’ is not declared. It may be inaccessible due to its protection level.
You are almost done
Mention the condition like this in if activity
If true it means there is a value and it goes to THEN Block where you can write as
Or it goes to ELSE block
And this error came because your for each row activity will have a variable in it
Either as row or CurrentRow
If it’s row then the condition will be like this
If it’s CurrentRow then this
As simple as that
Thank You for your detailed response.Now I am not receiving an error after entering: NOT String.IsNullOrEmpty(CurrentRow(“Billed”).ToString.Trim) but I am not receiving a message box when I run the file.
I got the first row to work for M1:M2 but when I do M3:M3 in the read range, I don’t get a message box
- You can use the For each row in Data Table variable “row”