Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting erros in a row

Status
Not open for further replies.

Fadius

IS-IT--Management
Jul 25, 2001
139
US
I have a report and it is working great. I have a row of data and formulas looking if the data element is correct or not. If it is not correct, it will say incorrect. What I am looking for is a way to get a total of all the incorrects in each row to display at the end of each row and am having trouble figuring out how to do this.

Example:

Name______Start________status______error
John______incorrect__________Pending_______1
Mary______01/01/12_________Complete______0
Mark______Incorrect__________Incorrect______2



I appreciate the help.
 
Create a formula like this where the array values are your current formulas that return a value or "incorrect":

stringvar array x := [{@Namechk},{@Datechk},{@Statuschk}];
numbervar i;
numbervar j := ubound(x);
numbervar cnt := 0;
for i := 1 to j do (
if ucase(x)="INCORRECT" then
cnt := cnt + 1
);
cnt

-LB
 
Thank you lbass. It is coutning some of the error, but not all for every row. What do the numbervar i and j represent?
 
Actually it looks like it only displaying a number for the last record in the group. I have everything placed in the details section including the counting formula.
 
The formula is for the detail section and it counts the errors for each detail row. Please show the actual formula you used and explain more specifically how the results are different than expected.

-LB
 
Here is the code I am using. I do have the formula in the details section.

stringvar array x := [{@AppAsOf},{@AppRcvd},{@AppSent},{@AppSTatus},{@Category},{@ComAsOf},{@ComStarted},{@ComStatus},{@CVI_Name},{@CVI_Type},{@EffDt},{@EnrollAction},{@OrigDt},{@Payor},{@PIN},{@Spec},{@Status},{@StrtChgDt},{@TID}];
numbervar i;
numbervar j := ubound(x);
numbervar cnt := 0;
for i := 1 to j do (
if (x)in["Incorrect","Missing"] then
cnt := cnt + 1
);
cnt


An example of what I am talking about is I have things grouped by Provider, then by insurance. In the details, a provider will have the same field field for every payor missing. However, the error count is only placing a total of errors for one of the lins for the provider.

However, it does not do this for every provider or detail line. I am still looking itno it to see if is something I did.
 
Are you saying that cnt is correct at the detail level? That is all the formula is designed to do, per your initial post. If you want to show the total errors per some group, then you need to make some changes. So where do you want to show the error count?

You mention a payor and a provider. Are they the same?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top