Skip to main content
Nintex Community Menu Bar

Generate a GUID

  • September 18, 2013
  • 4 replies
  • 224 views

Forum|alt.badge.img+1

Hello,


Does anyone know whether it is possible to generate a GUID in a smartforms? I see that you can define e.g. a datalabel with type AutoGuid, but can this be used to trigger such a generation? Or do I have to do this via a SmartObject?


Thanks,


Anders

4 replies

Forum|alt.badge.img+6
  • Nintex Employee
  • September 18, 2013

The AutoGUID is similar to the  Autonumber, it takes on the role of an identity type field where a GUID will be auto generated when a record is created. So effectively the guid is created behind the scenes when a record is created


Forum|alt.badge.img+2
  • August 19, 2015

I had the same problem. I missed the step of set default value of GUID field in database as (newid()). Once I added that to the GUID field in the table and updated the corresponding smart object. That property in smart object changed to autoGUID. 


Forum|alt.badge.img
  • October 30, 2020

You can generate a GUID in K2 by using one of the System SmartObjects.

It is in SystemManagementSmartObjectsSmartObjects and is called Common.NewGuid.

It has a single Read method that returns a GUID.

16293i727BB0921B9B7B84.png
Generating a GUID using the Read method of the Common.NewGuid SmartObject in the K2 Five Management Portal.

 


Forum|alt.badge.img+6
  • Novice
  • October 30, 2020

There is no smartobject or function to generate guid in K2 Blackpearl 4.7, you need to create your own advanced smartobject (SQL Server)