If Condition on data entry

Hi,

I am facing an error.i have automated one data entry work on my our application.my condition is if the excel row value is “STOP” it should close all my opened application should be closed.if any other text are there it should proceed the data entry work.

i used if condition but when the row reached the value “STOP” that text also entering on that field pls support

Capture Capture

Use if condition like row.Item(“name”).ToString.ToUpper.Contains(“STOP”) close all applications in else u can run ur data entry

Hi @gowthamr could you show the condition and variables on which this IF is set?

is this right but i am getting an error

i got this error

Capture

replace the cinema with column in like row.item(“column name”)

or
cinema is your variable then use like Cinema.ToString.ToUpper.Contains(“STOP”)

1 Like

OK Its not working. i explain here what i want to do

Excel sheet has 12 colums and rows count is variable sometimes it wil 10 sometimes and sometimes 340 rows.here if there is no data in a row .it should close my application windows (nearly 3 windows supposed to close can you give some idea.

@gowthamr

  1. You need to keep data in DataTable.
  2. Pick one cell from the row which will be relevant to use it as a ‘trigger’ to close applications
  3. In a loop assign this relevant cell to variable
  4. If this variable will have specific value or no value then close the application
2 Likes

1.use read range activity to read the excel store it in data table
2.then use for each row to get the each row from data table
3.in for each row body use get row item get the cell value
4.use above if condition after getting all data using get row item
5. after for each row use close application activity to close the application

2 Likes

thank you shyamm i wil check and update

1 Like