Skip to main content
Nintex Community Menu Bar

Dear all,

I am new to K2.

 

I got a database with primary keys (GUID type) and foreign keys in every table. Then I had created the smartobjects of all of them with the help of Smart Object Service Tester and generate smartobject the whole database's table.

 

I had create the view in K2 Designer for create method but it keeps giving me error of no data in the primary_id (which is the primary key with GUID type that has to be thrown to database).

I have tried to use the data label or text box with data type : AutoGUID but I keep it blank and I set the create method input to that data label or text box when the create button is clicked.

I also had tried to directly point it to smartobject primary_id but it keeps me the same error of id can not be blank.

 

I tried to insert data directly to SQL Server with SQL Management Studio, and it works, the GUID is auto generated without have to fill it.

 

Any idea on how to auto generate the AutoGUID types of text box or data label? or is there something I missed, like setting up some properties?

 

 

anyone can help me?


Hi Yan,


 


When configuring the "uniqueiidentifier" in SQL, please make sure that you set the "Default Value or Binding" column equal to "(newid())". I fell victim to this myself a while back. If you do not do this, the smartobject will require this as an input property. You will still be able to use it, but you will have to generate a GUID yourself and pass that in as an input property when executing the "create" method. And that defeats the purpose of an auto-generated GUID, when you have to generate it yourself :) 


 


Thanks and regards,


Willem le Roux.


 


 


I have the same problem but I cant pass the autoguid to a workflow,wrong file type. 


Reply