DT condition filter

Hi All,

Can you please assist
I have a DT


For some PO number I might have two rows. And if I have two I need to leave the row where in column E (ForwardTO) I have a null value
For other PO I might have only one row where where in column E (ForwardTO) I have not a null value. And I need to leave this row.
So in fact I have to leave those rows which I marked on yellow

BookRPA.xlsx (10.2 KB)
Gosia

@niteckam
Find some starter help here:
niteckam.xaml (6.5 KB)

1 Like

Thank you @ppr

hi @ppr
I do not understand why I have an error on activity Assign
Assign | leave only PO which should be forwarded 2: Object reference not set to an instance of an object.
Maybe someone can advise what I should change?
SequenceTESTDT.xaml (9.6 KB)2020.11.16.xlsx (9.3 KB)

@niteckam
Was it working / running the last months as the topic was not closed or was the work on it on hold?

dtResult is commented out. So it is not initialized and Null when it is used within the LINQ.
Just enabled it again or use another Datatable with the correct expected structure.

The issue is that from time to time I have an error on this ASSIGN activity.
Even if the dtResult is not commend out.
I can not find the problem
SequenceTESTDT.xaml (10.3 KB)

@niteckam
in SequenceTestDT the PO: 4501928828 occurs twice but each is filled with ForwardTO

so it is not matching the requirements specification from above and thats why the exception comes:

  • there are two Rows for one PO
  • But there is no row from this PO group where ForwardTO is empty - lets call it “grprowemptyFwd”
  • so no “grprowemptyFwd” (same PO, but empty ForwardTO) can be found

as the itemArray is used, but the "grprowemptyFwd"is not present it somes to this Null / not set to reference issue.

Just ensure that the data is conform to the requirements or respecify the requirements for covering all cases.

You can check it: just remove for one PO: 4501928828 the forwardTO value and let it run.
Feel free to check it for some older failling dataset, if there was the same problem

Hi,

Well… True now it seems to be so obvious. It looks like I did not include one of possible scenario and that’s why it might fail in specific situation. It that possible to modify assign and include also option when we have duplicate PO number but value in Forward To is not empty?