Guid Dependency
Question

Good Day

I am New to OutSystems.

Please help with a step-by-step on how to use the Guid Dependency.

I installed the GenerateGuid() dependency, but when I try to use it as a default value, I get a couple of errors as seen in the screenshot below.

I am used to My SQL where I just used NewID(), but when I imported that database it still did not generate a new Guid. So I created a new one on Outsystems but I'm still getting stuck.


Solution

I think you can simply do this in create server action before creating the record in database. Like this : 

Perfect, That worked. 


Thanks A lot

Hello Steven,


Unfortunately you cannot use a default value that is dynamic, it should be set as a static text. In your case you can make sure that whenever you create a Guardian record in the database you also generate a GUID and set it in this attribute.


Hope it helps,

Bogdan

As mentioned by Bogdan, you need to use static value. For Guid part you need to call GenerateGuid() server action before entering the record in database.

Hi, @Steven Zwane,

For this situation I would create a process that runs whenever a record from that table is created

And in this process I would Update with GenerateGuid():

Thank you for your response. I managed to add the process but the generated GUID doesn't appear in the Barcode entity. Is it maybe because the detail "GenerateGiud()" is incorrect? I also tried the null option but it still did not appear.




As you can see in the UI, the Guid doesn't pull through

Solution

I think you can simply do this in create server action before creating the record in database. Like this : 

Perfect, That worked. 


Thanks A lot

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.