sort reference field picklist

  • 1
  • Question
  • Updated 4 years ago
  • Answered
Even tried creating a formula field on the Pitch object for the display template of the field. It'll display the Pitch formula field in the picklist but still sorts based on the Name. I resorted to adding "0" in front of each entry in the Pitch table so it sorted the way I'd like and kept the formula field to display the value of Name.

Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
The name field is a string field,  meaning it is getting sorted by alpha.  That's why it gets sorted 1, 11, 12, 2, 21, 3, etc. 

You have resorted to adding a leading zero - which will work (Though its ugly).   You also could add a Number formula field to the object that transalted the name field number into a true number.  Then use the display template on the reference field to show that field instead of the name field. 

Those are your two options.  
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
That's exactly what I did. Looks the best but isn't ideal.
(Edited)