Hi Guys,

Does anybody know how to implement guid generator in Outsystems?

Instead of using the Long Integer(Auto Increment) Primary Key I will be using a Text Data Type Primary Key and the value of that Primary Key will be GUID Generated Code.


Any Help is appreciated.

Solution

You mean you are looking to generate a GUID?

If so, there is an system action that does that for you. See link to the documentation below.

https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/System_Actions#GenerateGuid


Edit: If you cannot find the system action, you may have to add it to your dependencies.

Solution

Sam Rijkers wrote:

You mean you are looking to generate a GUID?

If so, there is an system action that does that for you. See link to the documentation below.

https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/System_Actions#GenerateGuid


Edit: If you cannot find the system action, you may have to add it to your dependencies.

Thank you very much Sam.


Is there something to do this for Mobile as a local action? 

You can use JavaScript for that.

eg: https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript

Not all solutions are perfect, so be aware which code you use.