Sathish_M_K_9561

UC4 script : SUBSTR issue

Discussion created by Sathish_M_K_9561 on Aug 8, 2017
Latest reply on Aug 8, 2017 by Sathish_M_K_9561
Hi folks,
I have a requirement to get the sub string from a original string  from reverse order
Eg:
: SET $TEXT1#="My name is XYZ"
: SET $TEXT2# = SUBSTR($TEXT1#,-4,2)  ! I am expecting "is" as output.

on save script is not validating and throwing an error at substr.

Can't we use substr position from  end of the string unlike other scripting languages.

Regards,
Sathish

Outcomes