A quick script to show how we can take a String value and return it in revers.
In this example I will take the text value form a Text field called Text1_c
and display it in revers in a formula field.
def myString = Text1_c
if(myString != null)
{
def revers = ”;
for(def i =(myString.length()-1);i>=0; i–)
{
revers += myString.charAt(i);
}
return revers
}
else
{
return “No Value To Revers”
}