I want to filter NO GE Deviation data that only has CLOSED status, if there is an Open status in NO GE Deviation, it will not be included in the filter. I have tried several filter activities but none of them worked. Is there anyone who is willing to help to create the flow in the UI Path StudioX? thanks in advance
Hi Chandika, thanks for the kind response! I really appreciate your help! But the filter I mean is not that simple, because in the NO GE Deviation there are several data, if one of the data in the same NO GE Deviation has an Open status, it is not filtered… But thank you so much!!
For Each Row in DT_Main.DefaultView.ToTable(true,“No GE Deviation”)
** Filter Data Table into DT_Temp with keep rows set to “No GE Deviation” = CurrentRow(“No GE Deviation”).ToString AND “Status” = “OPEN”
** If DT_Temp.Rows.Count = 0
*** Then Filter Data Table into DT_Temp with keep rows set to “No GE Deviation” = CurrentRow(“No GE Deviation”).ToString
*** Merge Data Table DT_Temp into DT_Final
The logic here is to loop through the unique values of No GE Deviation and check if there are any that are OPEN. If there are no rows OPEN, then get all the rows for that No GE Deviation and copy them into DT_Final.
The .DefaultView.ToTable expression gets you the unique values for that column to loop through.
After it runs, DT_Final will have all the rows for the No GE Deviation values that do not have an OPEN status in any of the rows.