I have sample excel:
Against Column B, i have to load Coulmn C , D, E values
two loops:
Outer Loop for column B
Inner loop for column C to E
But how do i make it work in uipath?
Version used :
I have sample excel:
Against Column B, i have to load Coulmn C , D, E values
two loops:
Outer Loop for column B
Inner loop for column C to E
But how do i make it work in uipath?
Version used :
I am populating data into a web application.
So first I populate agent ABC (Column B) and BU (Column A) at the header level of the application page.
Then against each agent and BU, I need to populate line details that is Column C, D and E.
So i want the bot to first enter the header details, then come to line details, iterate for all line details. ABC has 10 lines. So loop should run 10 times, stop and come to the outer loop.
Again as per outer loop, take the next agent MNO and poulate its line details, and this way.
Please follow below steps to do this.
First useRead Range activity to read the data from excel file and will give you output as DataTable and say ‘inputDT’.
And then find unique records based on Column Agent like below.
agentDT = inputDT.DefaultView.ToTable(True,"Agent")
And then use ForEach Row activity to iterate one by one agent data.
ForEach row in agentDT
filterAgentDT = inputDT.Select("Agent = '"+row("Agent").Tostring+"'").CopyToDataTable
ForEach agent in filterAgentDT
Pass values like this:
agent("Allowed").Tostring
agent("BU").Tostring
@Mallika
Your scenario is Type of group by approach
For each col a, b group, handle the group of col c,d,e
Doing this can be done with e.g two loops, and filterdata. But also there are some variations in IT.
So Let US know which excactly Help you need and provide us an example with Sample data.on this Base WE can Help you with the Implementation or doing Dom Demo Implementation
are u using 3 loops?
I am trying to understand ur logic
I am confused. can u pls elaborate
@Mallika please Upload your excel.xlsx file., Not the Screenshot. In Case of prototyping WE can use this directly and do Not loose time in creating a sample Data File. Thanks
@Ok will have a look on it give me some little time
@Mallika
some differences between excel and sample data form posts were encountered. However find attached demo xaml showcasing with log messages the different stages of the processing:
Logic as described above:
For each col a, b group, handle the rows col c,d,e belonging to the particular group
Demo XAML: Mallika.xaml (12.3 KB)
dont miss out to rewire the path your excel
Let us know your feedback and flag the solving post as solution. So others can benefit from it
Thanks and really appreciate your effort. I ran your xaml and it worked as expected.
But to be honest, i did not incorporate your logic as i found it complex for my understanding.
I took a simple approach, which solved my problem.
just this logic
i = 1 to 10
j = 1 to i
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.