I am having datatable as Name,Country,Gender and in this gender their are many rows like M & F and now i want to print only the gender value which is having M, i want to print it in log messages
Use if condition like this
In for each row data table
In then block use Log message
Log level- INFO
both logs not working and mainly after looping it is showing error as gender not in datatable
Take a look in the “Locals Panel” to check the Column Name.
Assuming the column is called “Gender”
Then insert a For Each row.
Then insert a log with:
Hopefully this helps
Instead of columnName give the Column index…
Remember Column index always starts from 0.
Inside the For each row
Take one if condition
And mention like this
Now take Log Message
if want to print the names of gender M through log message
After If condition which is mentioned above
In the then part
Use like this
Try this and let me know
i am getting this result but how i need is if i mention the word ‘m’ then i should get all the names of all Males names that is their in datatable
You can use contains also but the thing is
Female also we can have m letter
Male also we can have m letter
Instead of using the contains it’s better to use the Equal in if condition
So if you need all names at a time you should use List.
You need to add the each item to list then you can get the names which is the gender m
No need to use For Each row:
Use Filter DataTable->Input DataTable->Output of ReadRange->Output As->New_Dt
Take one Output DataTable activity
Provide input Dt as->New_Dt
Output as → Create new string variable
In log Message mention this String variable
ok i will try and let u know nani
finally after trying many trails I got it thanks nani
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.