How would you filter rows out of GetRows()

at the moment I am trying to filter on a GLTracker GetRows() Method

DataSet dsChart = GLAdapter.GetRows("MainBook", "D", false, chart, today.Month > 3 ? today.Year + 1 : today.Year , "", cytPeriod < 6 ? "Main":"2ndHalf", out balance);

I am trying to filter out all of the reverse accruals which are located in the Journal detail table, I would need another parameter in the method to do this, so is there a easier way to filter the method or do I basically have to rewrite the method and add the parameter.

OR is there a better way of doing this. I am lost at the moment on how I can weed these accruals out of the totals that are inserted into GLTracker.

I have done some things in a post processing on GetRows (for other tables… not GL) where I did a BPM that simply removed the rows that we didnt want to show… for Vendor.GetRows, we wanted to hide a specific set… so we put the following line into a C# block:

ttVendorList.RemoveAll(ttVendorList_Row => ttVendorList_Row.GroupCode == "PTNR");

maybe you could do something similar to the returned rows from GLAdapter?

1 Like

The GL Tracker adds all of the data together for you by each period. by the GetRows, I can’t post process it cause there is nothing to remove just the values are incorrect because of the reversals. So what I did was a make a BAQ that gets the total cost of the reversed rows and added it on to the credit-debit I just don’t like doing it this way because it looks very sloppy.

dalps.ExecuteByID("CYT-Accrual-Ignore",qeds);
			decimal calculated_amount = 0;
			DataTable dt = dalps.QueryResults.Tables["Results"];
			if (dalps.QueryResults.Tables["Results"].Rows.Count > 0)
			{
				foreach (System.Data.DataRow r in dalps.QueryResults.Tables["Results"].Rows)
				{
					calculated_amount +=  Convert.ToDecimal(r["GLJrnDtl_DebitAmount"]) + Convert.ToDecimal(r["GLJrnDtl_CreditAmount"]);
				}

	
			}

			decimal cUsed = cDebit - cCredit + calculated_amount;

does this make sense.