cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Set number variable control default to empty rather than 0 in task form

Jump to solution

I have a Nintex Workflow for Office 365 workflow with several task forms, many of which contain numeric controls that are used in calculations. For security purposes, I want to point these controls to variables rather than list columns.

However, when I try to point a control to a Number variable, the default value is 0, even though in the control settings, the default is blank. I want the field to show up empty so people don't have to remove all the 0's and replace them with valid numbers.

Any suggestions on how to make a number control default to blank without tying it to a list column?

Tags (2)
0 Kudos
Reply
8 Replies
Workflow Hero

Re: Set number variable control default to empty rather than 0 in task form

Jump to solution

By numeric control, do you mean a textbox set to type number?   If not, can you post a screen shot of what you mean.  Thanks!

Reply
Workflow Hero

Re: Set number variable control default to empty rather than 0 in task form

Jump to solution

Thanks for the reply, Mike.

I created a workflow variable of type “Number.” Then, in my task form, under form controls > Workflow Variables, I dragged the variable I created into the form.

If you still need a screenshot, let me know.

Brad

Reply
Workflow Hero

Re: Set number variable control default to empty rather than 0 in task form

Jump to solution

I haven't tested to see if there is a way to force a numeric var to be blank, but I'm assuming you are seeing the 0 because its being set as a default behind the scenes which means you probably won't be able to change that.   What you could do though is use text variables instead which will allow for blank and then convert the text values to numeric.  You could also put some validation to make sure numeric values are entered.    Not sure if there is any other work around as I haven't had a chance to dig into it too much.


Thanks

Reply
Workflow Hero

Re: Set number variable control default to empty rather than 0 in task form

Jump to solution

How about executing some JavaScript after document.ready?

Haven't tested it myself but some rather simple NWF$('#'+myId).val("") could do the trick.

Regards

Philipp

Reply
Workflow Hero

Re: Set number variable control default to empty rather than 0 in task form

Jump to solution

Thanks for the suggestion. Making it a text variable seems to do the trick and my calculations still work. I'll tinker with validation as well since non-numeric data will break the workflow, but at least this resolves the issue I raised.

Reply
Workflow Hero

Re: Set number variable control default to empty rather than 0 in task form

Jump to solution

How do you do exactly the opposite? On new, my number fields do display 0, as was set up in List Settings. But on display, there are blanks, and I need zeros. I tried Set a default and Use the pre-set default, they are still blank.

0 Kudos
Reply
Workflow Hero

Re: Set number variable control default to empty rather than 0 in task form

Jump to solution

Hello,

In the textbox on the form you should be able to set a default of 0, just tried this and it works (single line of text connected to type text in list).

Mike

0 Kudos
Reply
Workflow Hero

Re: Set number variable control default to empty rather than 0 in task form

Jump to solution

I need it to become a text "0" field only on display. Otherwise, I need the fields for calculation. Please help!

0 Kudos
Reply