Question on FormCalc

Avatar

Avatar

Giantsnation

Avatar

Giantsnation

Giantsnation

16-12-2010

Not sure what functionality I need to be using but here is what I am looking to accomplish. I need to know how to count the number of rows in a table that are not  null. I have a table with data but what I need to know is how many rows  are filled out. In other words, if 5 rows out of 20 are filled out, I  need my form to tell me that 5 rows are filled in. The specific data in  the table is irrelevant for this calculation. Furthermore, I do not need the formula to validate the all columns in the row, just 1 column filled out is fine.


I tried the following formula but this is literally counting each row as  1 without looking for data. If the row is blank, I need the formula to  skip that (or count it as 0). As mentioned, I can also pinpoint a specific cell if  needed.

Count("Page2.Table1.Row1", "Page2.Table1.Row2")

View Entire Topic

Avatar

Avatar

Karwan_Mawlood

Avatar

Karwan_Mawlood

Karwan_Mawlood

16-06-2016

Thanks alot dear

your idea works great, but I don't know what is wrong it's still showing that there is 1 empty fielled in the form while there is none ! Help please below is my code :

Below is the code to get the empty filleds (counter);

form1.Page1.notification.NumericField1::ready:layout - (FormCalc, client)

var FilledRows = 0

for i = 0 upto Body.Table1.Row1.instanceManager.count - 1 do

     if (Body.Table1.Row1[i].drp_names eq null) then

          FilledRows = FilledRows + 1;

          this.rawValue = FilledRows;

     endif

endfor

the code in Javascript to check if the value of the counter is zero

form1.Page1.save_as::click - (JavaScript, client)

   if (notification.NumericField1.rawValue == 0){

  xfa.host.messageBox("This will save your form as PDF form, means you can edit later once more","Save As Form",3,0);

  app.execMenuItem("SaveAs");}

else

{xfa.host.messageBox("You have : " + notification.NumericField1.rawValue + " empty highlighted fields","Empty Fields",3,0);}