Cast text type to identity type

Cast text type to identity type

Is it possible to cast a text type to and identity type? If so, how?


Hi Clayton,

Yes, there is a BuiltIn funtion named 'TextToEntityRefText' that converts a Text to an Entity identifier (Text identifier).  If you have an Integer identifier, I suggest you to parte the integer ('TextToInteger') and later convert to Entity identifier with 'IntegerToEntityRefInteger'.

João Portela
Hi João Portela,

By the name thou think that I will speak Portuguese but I'll speak to English
I have the free version of the service studio 5.1, as it turns out that the Clayton also need to convert one text type to indentifier type, but in my service studio doesn't appear infuntion Built-in funtions you mentioned. It is necessary to contain another version of service studio?

Cumprimentos Renato Fernandes
Hi Renato,

Built-In function 'TextToEntityRefText', 'TextToInteger' and 'IntegerToEntityRefInteger' are available in all versions (5.1 included).

Notice that these are "Build-in Functions" and not Built-In Actions. Build-in functions are available in expressions (e.g. using expression editor, you can try using auto-complete...); build-in functions are available in the action flows, including screen actions.

João Portela
As a reference, in Version 9:
TextToEntityRefText is now named TextToIdentifier
IntegerToEntityRefInteger is now IntegerToIdentifier


In a Web Block, I use the Notify action to send an entity identifier back to the parent Web Screen. On this Web Screen, I need to run an SQL query using that identifier as a parameter. For this purpose, I tried TextToIdentifier but I get the following warning:

Unexpected Data Type | 'Manufacturer Identifier' data type expected instead of 'Text Identifier'.

Is it possible to convert a text string into a general entity identifier (which, I believe, is a Long Integer) without warnings?

Hi Rui, 

you can first transform the text into an integer, and later the integer into a integer-identifier:

IntegerToIdentifier( TextToInteger(myId))


João Portela

Hi João,

Thanks for your reply - that solves the issue!