cancel
Showing results for 
Search instead for 
Did you mean: 
simbel
Nintex Newbie

Create an element in another site : field value [number] should be empty but sets to zero.

I'm using the "Create an element in another site" action in a Nintex workflow.

I'm trying to copy every field of an element in another list. The problem I have is, with a number field, when I define the value, if the source value is empty, it sets the destination value at 0. Is there a way to do it so it would be empty too.

For a text field, I can set the value as "Value" and insert a reference for a field.

But, for a number field, I need to select "Research in a list", Source : "Current element" and Field : [my field].

Thank you!

Labels: (2)
0 Kudos
Reply
3 Replies
praios81
Nintex Newbie

Re: Create an element in another site : field value [number] should be empty but sets to zero.

Hi,

this post seems to address a similar scenario so maybe the solution works for you too. It basically uses string variables instead of number variables:  

Maybe you can first get your current value in a string variable, parse it if needed and then write it to your new list?

Best regards

Enrico

0 Kudos
Reply
simbel
Nintex Newbie

Re: Create an element in another site : field value [number] should be empty but sets to zero.

So, it worked... BUT!
I had an uneasy feeling while doing it since... a number field should normally be a number field!

After converting all the fields and redoing all my workflows, my users needed to export the SharePoint list in Excel files to produce some charts. Since the fields are text values, they can't produce charts without copying the data from the table to a new excel file and pasting it as value. And then convert the text field to numeric value.

So I'm still screwed here and it complexifies a lot something that should normally be rather simple!

0 Kudos
Reply
praios81
Nintex Newbie

Re: Create an element in another site : field value [number] should be empty but sets to zero.

Well the only thing I see you could try is the following (it won't win the workflow design award 2017 though):

  • you first check if the value of your field is larger than 0
    • if it's larger than 0 create the element like you did
    • if it's not larger 0 have a another create element in another site action that doesn't set the field value in question (and thus should leave it blank)

It really is not beautiful but maybe it works

The only other options I see are by creating the item using PowerShell or web services that might give you some more control over how to set the item values.

0 Kudos
Reply