Foreach Where .Added()

,

I have a for each as the below in a BPM. If I remove the Where statement it returns all the expected rows (in this case, two). However, how do I get just the newly added rows so my foreach does not return rows if the AP Invoice lines already have been created?

    foreach(var x in ttAPInvDtl.Where(p=>p.Added())) {

I’m not exactly sure what the Added method is doing. However when a row is added the rowmod should be A. This means it exists in your data and has not yet been added to the database. I think this might be what you are looking for.

foreach(var x in ttAPInvDtl.Where(p=>p.RowMod == 'A')) {

1 Like

Thanks Jeremy! I tweaked it to be double quotes instead of Single to get the syntax to work.

foreach(var x in ttAPInvDtl.Where(p=>p.RowMod == "A")) {

However, it is now not triggering when it loads the two rows of the GetByID BPM I am trigger. I am going through the trace log and I will let you know what I find.

The RowMod is empty when I am doing the GetByID. I am checking to see if there is a better method for me to trigger off of.

I have moved to this thread as the method GetByID I am triggering off of will never have the RowMod changed and will also be called at times I don’t want my BPM to run. I have posted my problem here: ttAPSelectedRcptLines is empty though DS shows in tracelog