[Question] Is there a way to get first (or last) letters of a [String] field?

RSZ-EC

Member
Hi everybody!

I need to create a [Composite] (or any other) field with a code using the first three letters from a [String] field. So, if the [String] fields contains "General", I need to automatically get "GEN" in another field.

Is there a way to do that (mainly in version 5)?

Thanks in advance!
 

Anti

Administrator
Staff member
Hello!
Yes, this can be done using the Composite field and functions of receiving a character from the beginning (end of the line)
The formula of a composite field will be:
[1(String)][2(String)][3(String)]

If the resulting characters need to be converted to upper case, use the Upper function. But since at the moment the nesting of functions is not allowed, and also you cannot use a Сomposite field inside the formula of a Сomposite field, you need to use the auxiliary field String2, which takes a copy from the Composite. Then another Сomposite2 field is added, in the formula of which:[Upper(String2)]

Functions for getting the character from the end of the value: [-1(String)][-2(String)][-3(String)], and so on.
 
Top