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

  • 23 October 2017
  • 3 replies
  • 4 views

Badge +1

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!


3 replies

Userlevel 4
Badge +12

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

Badge +1

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!

Userlevel 4
Badge +12

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.

Reply