So basically, I’m supposed to group all items with the same Requisition Segment number, and put them in a DataTable to use them later on in my use case. How can I do this?
For example: All under the same requisition description, e.g. 1, all the rows associated with that number will be captured and grouped in a DataTable, but it isn’t always in ascending order. it may get mixed up in a different order such as:
I’m supposed to do a Create Requisition (my process wherein I need to order a bunch of items, depending on the requisition details sent - if they’re on the same requisition segment) So after grouping everything with the same requisition segment, I need to run a process, then after that process, I need a loop wherein I should create another requisition for the next set of same requisition segments, it goes on until I finish all the segments.
I hope that makes sense
Is it possible to do this in UiPath?
Disclaimer: I apologize as I am just new in UiPath and still trying to learn, I’ve read a lot of documentations but to no avail.
You can read the excel data into a data table using read range activity.
The output will be in a data table.
Use Remove Duplicate Rows activity to remove the duplicate values from a data table.
So the final data table contains only one row for each requisition segment.
Get the unique Requisition Segment IDs. ( something like this DataView.ToTable(false,"Requisition_Segment"))
Filter the data table for each segment ID, for each ID in dtUniqueIDs
You can use either Filter Data Table activity or the following expression
if ID is integer filterDataTable = yourDataTable.Select("Requisition_Segement=" + ID + "")
if ID is string filterDataTable = yourDataTable.Select("Requisition_Segement='" + ID + "'")
I don’t quite get your response above, please bear with me as I don’t have much experience in both .NET and UiPath (still trying my best to learn):
Get the unique Requisition Segment IDs. ( something like this DataView.ToTable(false,"Requisition_Segment") )
Filter the data table for each segment ID, for each ID in dtUniqueIDs
You can use either Filter Data Table activity or the following expression
if ID is integer filterDataTable = yourDataTable.Select("Requisition_Segement=" + ID + "")
if ID is string filterDataTable = yourDataTable.Select("Requisition_Segement='" + ID + "'")
Here are my questions:
In no.1, you said that I should get the unique requisition Segment IDs right? Does that mean I should use the assign activity then assign a variable e.g. filterRequisition = DataView.ToTable(false, “Requisition_Segment”)? Please refer to Picture 1.A
And in no. 2, should I use a filter data table activity or a flow chart with a flow decision activity? Which of the two activities would be better to use? Assuming that I create a variable called filterDataTable, how am I supposed to fill these up? Please refer to Picture 1.B
Basically, this is how my workflow currently looks like:
Picture 1.C
1.) Read DataTable Sign In Details - the excel where the sign in details are stored
2.) Read DataTable Req. Segment - the excel where the requisition segment details are stored. 3.) Sort/Filter Data table (There’s nothing inside here yet, this is where I plan to put the mentioned activities above).
4.) Purchase requisition using the dataTable reference.
I hope I explained this clearly, but please do tell me if you didn’t. Also, I apologize for the late reply, I tried to do and study the suggestions you mentioned for the last few days but I still don’t quite get it. Please bear with me as I really want to learn this, also thank you for the time you are giving by reading and responding to my post, I really appreciate it.