Hi,
how to get all headers of columns with specific value in specific cell?
I have a problem with filtration of datatable. I’ve got file “config” with all information who sends an email to whom. CONFIG.xlsx (13.6 KB)
My workflow look like that:
User write his email adress (by “InputDialog”)
Robot read range from file “CONFIG.xlsx” and put it to DT_1
For each row in DT_1 → if → row(“email”).ToString=user_email
and what now? I want to get all headers of columns with cells contains “1” in this specific row
How to filtrate it next?
@Sevlir I can think of a few ways to do it. But can you give a gist of what you will be doing with the columns that have 1 in them? Based on that I can suggest what suits best for you.
Could you please help me to understand issu e correctly,
I understood following, correct me if i am wrong
Read config file and store into dt1 (dt1 is datatable variable)
Ask user to input email id via input dialog box and store value in userEmail (userEmail is string type variable)
3.then robot will check userEmail is present in dt1
Use following equation in try catch and catch invalidoperationexception (email isnot in dt1)
Dt2 = dt1.Asenumerable.where(function (r) r(“email”).tostring.toupper.trim.equals(userEmail.tostring.trim.toupper)).copytodatatable
The number “1” in column means that this is a company that robot will send a message. It is a simple matrix where 2 conditions must be met. I’m using read range because client want to have an option to change it freely of file “CONFIG”.
Yes but I only used “row(“email”).ToString=user_email” in “If” activity and I don’t know that to do next.
With this command I have the row I need.
And now I need all headers of columns with “1” in it for that specific row.
The number “1” in column means that this is a company that robot will send a message in next steps.
Almost because client want to have possibility to add more columns. I’m looking for solution to find column header if this column contains in row (with user email) number “1”. It is a simple matrix where 2 conditions must be met.
Keynote here is to find by robot all column headers for row with email address user give in the beginning. Headers are another email addresses where robot will be sending messages.
I have to use it inf “If” activity?
Like this:
If: row(“email”).ToString=user_email
Than: assign
Colums = dt.Columns.Cast(Of DataColumn)().[Select](Function(x) x.ColumnName).ToArray()
???
Is this all written in VBA?
Do You maybe know where can I find commands which work in UiPath. I’m asking because I quite don’t understand how Your command works.