Am using if condition inside the For each Row in Data Table isn't working

This is any mistake in my condition

@krishna_priya1

Can you show what is the loop…what is not working…what is the input and expected output please

cheers

Actually I want to compare the value in variable “data” and data “table data”

inside the if is Not work bro

@krishna_priya1

So you mean its not going inside if condition…I would suggest you to use log messages and check both the values you are comparing…may be there are some differences

One thing I can see is Offer accepted date…is a date you want to compare then you can to convert them to date…Cdate(variable) will convert it…try doing this on both sides of the condition

cheers

cheers

Actually i don’t want to Compare the “offer Accepted date” and GmailDate

GmailDate is the variable it’s contains (Today’s date)

@krishna_priya1

CDate(Candidate.Item("Offer Accepted Date").ToString.Trim) and Cdate(GmailDate.ToString.Trim)

is what you need to use to compare dates

cheers

Bro
Actually “CId” data is one variable and
“CID” data in data table
I want compare both data’s

If both of them or same print “Confirmed” is one Colum

in this For each row in data table IF condition Not working y bro
I gave the correct syntax only

Can you plz help bro to resolve this

Hi @krishna_priya1 Can you please try the below condition in IF

CandidateItem("Provide column index for CID").ToString.equals("CID").ToString.Trim And CandidateItem("Provide column index for Offer release Date").ToString.equals("Gmaildate")ToString.Trim
  • Give Column index as 0 if the CID belongs to first column or 1 for second column …
  • Same Applies for Offer Release date column…