Skip to main content
Nintex Community Menu Bar

Blank out a number field that defaults to zero.

  • August 8, 2017
  • 3 replies
  • 24 views

Forum|alt.badge.img+2

I have a SharePoint 2013 on prem list that has a number field. Most of the time when a form is filled out this field is left blank (as it needs to show). We report off of this field and need for it to show blank and not "0". 

Is there a way for me to do this with either forms or workflows?

Thanks

3 replies

Forum|alt.badge.img+9

Hi Ryan McDeavitt,

In column settings you can clear out the default value.

206437_pastedImage_1.png

Or, If you want you can do using JavaScript also. Name number control's JavaScript variable as 'Number'.

206390_pastedImage_1.png

Add this code in form settings->Custom Javascript

NWF$(document).ready(function()
{  
   var number = NWF$('#'+Number).val();
   if(number == 0)
   {
     NWF$('#'+Number).val('');
   }
});

 Thanks,

Lakshmi C


Forum|alt.badge.img+14
  • Scholar
  • August 9, 2017

how do you have configured default value in list field and form control?

if neither of the two is configured, field should left blank.


Forum|alt.badge.img+11
  • June 28, 2019

Hi @lakshminarayana 

Can I use that java script in a 365 task form? It doesn't error when i publish the workflow, however the task form refuses to open. It sits there trying to open. 

NWF$(document).ready(function()

   var number = NWF$('#'+Number).val();
   if(number == 0)
   {
     NWF$('#'+Number).val('');
   }
});