Skip to main content
Nintex Community Menu Bar
Solved

Cannot insert the value NULL into column "ColumnName", Column does not allow nulls - Designer

  • February 20, 2018
  • 6 replies
  • 470 views
  • Translate

I have been designing a mobile device tracking application for a few days. There is an object called "BroadbandDevice" with a bunch of properties, only one of them being required. The problem I am having is that when I try to set the value of property "Number" as empty, I get the following error: 15999i76D95E3FA3386E43.png

 

Best answer by davidedpg10

SOLVED!!!
So apparently it was a weird bug where the SQL DB had Number as not allowing a NULL value, I went into the object, changed it to required, saved it, and then changed it to not required and saved again. That seems to have unset the SQL Database to allow Null value.

View original
Did this topic help you find an answer to your question?

6 replies

Albarghouthy
Forum|alt.badge.img+16
  • Scholar
  • 741 replies
  • February 20, 2018

Hi David,


 


Do you get the same error when you execute the smartobject from the smartobject tester tool?


What version of K2 are you using?


 


It seems you're using the smartbox service, can you access the K2 DB and generate a scrip of the table BroadbandDevice then attach it here?

Translate

  • Author
  • 40 replies
  • February 20, 2018

I did run it through the SMO Services tester tool, and I had the same issue.

 

The version of K2 is actually very outdated, 4.6.11 to be exact. We are in the process of upgrading it to 4.7 but it won't happen until either end of this week or next week.

The insert script is as follows: 

INSERT INTO [K2Dev].[dbo].[BroadbandDevice]
([IMEI]
,[Number]
,[User]
,[SIM]
,[personally_paid]
,[previous_user]
,[order_number]
,[date_activated]
,[date_assigned]
,[HW_billed_to]
,[Notes]
,[part_number]
,[Serial_Number]
,[inactive]
,[replaces])
VALUES
(<IMEI, nvarchar(100),>
,<Number, nvarchar(100),>
,<User, nvarchar(100),>
,<SIM, nvarchar(100),>
,<personally_paid, nvarchar(100),>
,<previous_user, nvarchar(100),>
,<order_number, nvarchar(100),>
,<date_activated, date,>
,<date_assigned, date,>
,<HW_billed_to, nvarchar(100),>
,<Notes, nvarchar(max),>
,<part_number, nvarchar(100),>
,<Serial_Number, nvarchar(100),>
,<inactive, nvarchar(100),>
,<replaces, nvarchar(100),>)
GO

Translate

  • Author
  • 40 replies
  • February 20, 2018

in the SQL tablle itself I do see the option of whether to allow null or not, but it will not let me save it.

I'm not sure if it would have cause other issues if it did save, but that would allow it to have a null value.

Translate

  • Author
  • 40 replies
  • Answer
  • February 20, 2018

SOLVED!!!
So apparently it was a weird bug where the SQL DB had Number as not allowing a NULL value, I went into the object, changed it to required, saved it, and then changed it to not required and saved again. That seems to have unset the SQL Database to allow Null value.

Translate

Forum|alt.badge.img+2
  • Rookie
  • 6 replies
  • January 4, 2019
We have the same issue with the SO when trying to create a record in the DB ,the requirements is that a couple of Date Fields ( they are calculated fields in the DB) are required in the DB but we don't need to map them in the SO. Any suggestions ?
Translate

Forum|alt.badge.img+13
  • Scholar
  • 499 replies
  • January 4, 2019

I think in this case you would need to use a stored procedure to insert the record, as K2 only sees the not null field and makes it required to be passed in.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings