To validate the data

Hello everyone ,

I have data in the excel sheet . one of the columns value is of the pattern “ABC-123”
ABC is same for all the values , only the numbers change
I have loaded the data into the queue and then pulled the data from queue to the workflow .
I want to validate whether the data is in the correct format .

I am using decision box .
Could any one tell me what should be the condition that i should use

Thank you

You can use Regex operation - IsMatch activity or
Check if the starting of string matches with ABC → Yourstring.substring(1,3) = “ABC”

Karthik Byggari

Hi Karthik ,

Could you explain me a bit more . I am new to robotics and not able to understand .

My variable which i have stored the value is ProductCode
so how do i use it in the expression

Is it something liek
Regex.IsMatch(Productcode, ABC- ***)

Please help me

Not code. You have to use isMatch activity.

About isMatch activity -

Input - Productcode
Pattern - “ABC-\d\d\d”
Result - Create a variable, if matches true will be returned

@kavsanu Use below pattern



IS this correct

Yes. If the pattern matches, FinalValue contains true.
In If Condition use FinalValue.

Okay … let me check

Thank you so much

@kavsanu Can you share some one or two example

Hello Indra,

I didnt use Ismatch activity for my workflow . Sorry


Hello Karthik ,

Actually i am checking whether the field is just empty or filled in .

i have four columns in my excel sheet which i loaded it to the queue . Now i extracted it and stored it in the variable using assign activity .
Then i am using a flow decision
If the data is correct , then Proceed in opening the application and filling in the data .
If the data is wrong , then quit .

I have used the condition -
string.IsNullOrEmpty(ProductCode) and Quantity <> “” and Isnumeric(Quantity) and UnitPrice <>"" and isnumeric(UnitPrice) and CostCentre=""

But I think this condition is not working .
Could you please help me out here .

Thank you

Could any one help me :slight_smile:


Split those condition first check for null values

string.IsNullOrEmpty(ProductCode) and Quantity <> “” and UnitPrice <>"" and CostCentre=""

if this condition is passed check again below 2 conditions.

Isnumeric(Quantity) and isnumeric(UnitPrice)

Before doing this check all conditions individually whether they are giving proper output or not

Thank you for your suggestion . It really helped me

I checked one by one and it worked .
I had to change the expression for product code
Final condition which I used was

Productcode<>nothing and Isnumeric(Quantity) and Isnumeric(UnitPrice) and Isnumeric(CostCentre)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.