How to find a duplicated record in Rave, will you write 2 for loops and make sure the query fire correctly? "TWO FOR LOOP"? not sounds smart for me, how about to use 2 array lists to implement it?
ArrayList ECGFindList = new ArrayList();
ArrayList ECGFindDupList = new ArrayList();
for (int i = 1; i < dpgEcg.Records.Count; i++)
{
if (!dpgEcg.Records[i].Active)
continue;
DataPoint dpECGFinding =
dpgEcg.Records[i].DataPoints.FindByFieldOID(ECGFIND_FIELDOID);
if (!ECGFindList.Contains(dpECGFinding.Data) )
ECGFindList.Add(dpECGFinding.Data);
else
ECGFindDupList.Add(dpECGFinding.Data);
}
//-----------------------------------------------------------------
//close all query
for (int i = 1; i < dpgEcg.Records.Count; i++)
{
DataPoint dpECGFinding =
dpgEcg.Records[i].DataPoints.FindByFieldOID(ECGFIND_FIELDOID);
CustomFunction.PerformQueryAction(QUERYTEXT, SITE_BY_SYSTEM, false, false, dpECGFinding, false, afp.CheckID, afp.CheckHash);
}
//-----------------------------------------------------------------
for (int i = 1; i < dpgEcg.Records.Count; i++)
{
if (!dpgEcg.Records[i].Active)
continue;
DataPoint dpECGFinding =
dpgEcg.Records[i].DataPoints.FindByFieldOID(ECGFIND_FIELDOID);
if (ECGFindDupList.Contains(dpECGFinding.Data))
CustomFunction.PerformQueryAction(QUERYTEXT, SITE_BY_SYSTEM, false, false, dpECGFinding, true, afp.CheckID, afp.CheckHash);
}