Below Code works great but counter still shows 1 even there is no empty filled

Avatar

Avatar

Karwan_Mawlood

Avatar

Karwan_Mawlood

Karwan_Mawlood

16-06-2016

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);}

View Entire Topic

Avatar

Avatar

Karwan_Mawlood

Avatar

Karwan_Mawlood

Karwan_Mawlood

19-06-2016

hi dear,

I managed to find the code myself I started again but this time from Javascript not formcalc and it worked fine now below is the code for future help you will create one numerical field and put this code in layout ready

// Null check for expanding table and rows - Name and give how many are null

var notemptyrows = 0;

for (i=0;i<Body.Table1.Row1.instanceManager.count;i++){

   if (xfa.resolveNode("Body.Table1.Row1[" + i + "]").drp_names.rawValue == null)

{notemptyrows = notemptyrows + 1;

this.rawValue = notemptyrows;}

else

{this.rawValue = 0;}}