function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Venkat Reddy sfdVenkat Reddy sfd 

Auto caluculate Max value of Text field formula

Hi All,

Here is my requirement: i have field called Source_code__c in Metadata_source__c Object. Field type is "Text". from Source_code__c Field I have to select Maximum value and i have to TRIM first 5 Charecters. after that with Remaining Value i have to add +1 to that Value. How can i achieve this, please anyone can help me.
Eg:  Values of the Source_code__c= ABCDE1234 and ABCDZ1234 that means I have to get the value ABCDZ1234, From this value i have to TRIM or remove ABCDZ and Add+1 to 1234.
The Out put will be=1235.

I tried with creating new formula field For TRIM the Value but How can I select wich is the highest value and i dont know how to convert this string to Number in one Formula.

Formula is 
I want add the Formula Covert along with this Formula.

anyone can please help me.

Advance Thanks!!



If you want to add 1 to the number, you can try the following formula:


Here, value is to convert the text to number, then add 1, then convert back to text again because the data type you defined is Text. 

I did not quite get the requirement of getting the maximum value, you mean there are multiple values for Source_code__c field?
Venkat Reddy sfdVenkat Reddy sfd
Hi Yuchen,

Thanks for replying,
your right Source_code__c field have many values but i have to pick the Maximum value. field data type is Text  it contains value like ABCDE1234 or ABGFZ1256. from this  i have to get Maximum value. 

I will try with above code, let you know the update 
sukanth rsukanth r
Hi Venkat, 

I have the similar requirement, plesae can you explain how was you implemented thi srequirement.

Sukanth Reddy