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
chen grosmanchen grosman 

Creating a new Formula field

hello everyone,

i have an issue creating a new formula field. this is the requirements:

In case License Number field is not empty, Short License Number (which is the formula's name) field will contain License Number's first left character.
For example: "License Number" = 987654321 "Short License Number" = 1.

would appreciate any help.

thank you.
krishna23krishna23
Hi Grosman, hope you are doing good.

Use below formula it will work
IF( NOT( ISNULL( License_Number__c )) , RIGHT( TEXT(License_Number__c) , 1) , "")
krishna23krishna23
Formula should be test data type
IF( NOT( ISNULL( License_Number__c )) , LEFT( TEXT(License_Number__c) , 1) , "")
krishna23krishna23
Newly created formula field datatype should be text data type. Might be you selected number data type please change number data type to text
IF( NOT( ISNULL( License_Number__c )) , LEFT( TEXT(License_Number__c) , 1) , "")
 
krishna23krishna23
Ok got it. Might be your license number field text data type. use below one it should work.
IF( NOT( ISNULL( License_Number__c )) , LEFT(License_Number__c, 1) , "")