Forum Discussion

Data_SystemAnal's avatar
Data_SystemAnal
Qrew Cadet
5 years ago

Extract Initials

Hello everyone, 

I have this formula (Rich Text field )

var text FirstName = If([PreferredFirstName]="", [FirstName], [PreferredFirstName]);
var text MiddleName = If([PreferredMiddleName]="", [MiddleName], [PreferredMiddleName]);
var text LastName = If([PreferredLastName]="", [LastName],[PreferredLastName]);

$LastName&", "&$FirstName&" "&$MiddleName

OUTPUT: "Ponce Edson I"

HOWEVER, I AM LOOKING TO USED THE SAME FORMULA IF IS POSSIBLE THAT THE OUTPUT WILL BE ONLY INITIAL 

OUTPUT WILL BE:   "PEI"




------------------------------
Edson
------------------------------
  • Try this

    var text FirstName = If([PreferredFirstName]="", [FirstName], [PreferredFirstName]);
    var text MiddleName = If([PreferredMiddleName]="", [MiddleName], [PreferredMiddleName]);
    var text LastName = If([PreferredLastName]="", [LastName],[PreferredLastName]);

    List(" ", Left($FirstName,1),  Left($MiddleName,1), Left($LastName,1)


    On your original formula, I suggest using

    List(" ", $FirstName, MiddleName, $LastName) in case any of the three values are blank.


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • Data_SystemAnal's avatar
      Data_SystemAnal
      Qrew Cadet

      Hi

       

      Thank  so much for you always support

      It worked perfect

       

      Sorry for the late respond, very busy on this days

       

       

       

       

      Edson Gonzalez-Chavez

      Data System Specialist

      The Next Step Public Charter School

      3047 15th Street N.W., Washington, DC 20009

      edson@nextsteppcs.org

      Direct Line Office. (202) 299-5092 Cell: 202-520-2643