Importing tables with Uniquedentifier type fields

Importing tables with Uniquedentifier type fields

Hello All,

I'm trying to import in Integration Studio several SQL Server tables that have a UniqueIdentifier field as Primary Key.

I'm getting an error saying it should be Text or Integer.

Any workaround?

If this won't work I will be unable to use Outsystems to integrate 2 applications.

I'd prefer to use Outsystems than use Visual Studio...

Hi Nelson,

An Identifier is an Integer type which is AutoNumber and Uniqe.
Have you tried using the Integer type already?



The database from where I want to import the tables is from an application that we cannot change.
Most of it's table's primary keys are defined as UniqueIdentifier sql type and for what I can see , Integration Studio can't work with this field type.

Hi Nelson,

Following from Eric's suggestion you should import your (unmodified) table in Integration Studio and then set the Uniqueidentifier column to be of type Text and set it as the Entity's identifier. You will not be able to set it as AutoNumber.

Then all your queries on that Entity will work from the Agile Platform. Should you need to do a Create new row, you will need to generate and fill in the identifier with a suitable GUID on the code side.

See attached Solution I created as a sample. I used the sample table found at as the source for my entity.

   Characters      VARCHAR(10) )
INSERT INTO MyUniqueTable(Characters) VALUES ('abc')
INSERT INTO MyUniqueTable VALUES (NEWID(), 'def')


Thanks Miguel,

Will give it a try.

I just need to do a few queries and send some emails based on the queries results.
It really worked this way.
Many thanks!