How to convert a text to Entity identifier

How to convert a text to Entity identifier

  

Hi,

I have value of type Text and I would like to convert to an Entity Identifier (Order Identifier).

How to do this?Any help appreciated?

 

Use TextToIdentifier() function


Fabian wrote:

Use TextToIdentifier() function


Hi,

Thanks for the reply.But wanted to cast to an Identifier which is of type Order Identifier where Order is an entity.

TextToIdentifier just converts in to Text Identifier not to OrderIdentifier


Cheers

RajHasti


No. TextToIdentifier converts it to a numeric identifier not a text identifier. I am assuming your order identifier is a numeric identifier. a numeric identifier is basically a long integer. 

e.g. let's say you have a text "1234" and want to store it in a variable OrderId of type Order Identifier

in your assign action you assign TextToIdentifier("1234") to OrderId


Fabian wrote:

No. TextToIdentifier converts it to a numeric identifier not a text identifier. I am assuming your order identifier is a numeric identifier. a numeric identifier is basically a long integer. 

e.g. let's say you have a text "1234" and want to store it in a variable OrderId of type Order Identifier

in your assign action you assign TextToIdentifier("1234") to OrderId


Bump,

Ran into the same issue today, TextToIdentifier just changes it to numeric, but the requirement here is to convert it into the EntityIdentifier type. Using TextToIdentifier is not solving the issue.


Anurag,


you need to convert TexttoLongInteger() or TexttoInteger() and after that LongIntegerToIdentifier() ou IntegertoIdentifier()

E.g  IntegertoIdentifier(TexttoInteger("1234")) or LongIntegertoIdentifier(TexttoLongInteger("1234"))

Use accordingly your Order Identifier ( LongInteger or Integer)