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
Jay Parikh 36Jay Parikh 36 

Text fields to take first values

I have one text fields 

input ::::Feeler - 62, Exciter - 58, Bottom-Liner - 58, Detailer - 54


and in a new field i only want to see output as :::Feeler - 62    how can i achieve using formula field?? 
Best Answer chosen by Jay Parikh 36
RKSalesforceRKSalesforce
Yes, We can achieve this by using formula field.
LEFT( Text_Field__c , (FIND(",",Text_Field__c)-1 ))
In above formula let's say your text field is  Text_Field__c, so create formula field with text return type.

Please mark best answer if  it help.

Regards,
Ramakant
 

All Answers

Lokeswara ReddyLokeswara Reddy
Hello Jay,
You can solve this as shown here
String str = 'Feeler - 62, Exciter - 58, Bottom-Liner - 58, Detailer - 54';
String[] strArry = str.split(',');
system.debug('============>>:'+strArry[0]);

Note:If you wish to use other values, be sure to trim() them to avoid the spaces.

Regards
Lokesh
Jay Parikh 36Jay Parikh 36
hI lOKESH -- I HAVE TO CREATE FORMULA FIELD AND 
FIELD NAME : PROFILE HAS VALUES OF  Bottom-Liner - 78, Exciter - 71, Detailer - 67, Feeler - 65
I NEED TO CREATE NEW FIELD CALL TYPE WHICH SHOWS OUTPUT AS ONLY Bottom-Liner - 78
RKSalesforceRKSalesforce
@Jay
You have 1 text field or multiple?
Please confirm.

Regards,
Ramakant
Jay Parikh 36Jay Parikh 36
oNE TEXT FEILD AND FIELD NAME CALLED   PROFILE HAS VALEUES OF  Bottom-Liner - 78, Exciter - 71, Detailer - 67, Feeler - 65
AND NOW CREATING ONE NEW FORMULA FIELD WHICH SHOW ME ONLY Bottom-Liner - 78 AS A OUTPUT
RKSalesforceRKSalesforce
Yes, We can achieve this by using formula field.
LEFT( Text_Field__c , (FIND(",",Text_Field__c)-1 ))
In above formula let's say your text field is  Text_Field__c, so create formula field with text return type.

Please mark best answer if  it help.

Regards,
Ramakant
 
This was selected as the best answer