user17152

Custom function for sorting a list of values?

Discussion created by user17152 on Jun 27, 2016
Latest reply on Jun 27, 2016 by user17152

Can anyone point me towards a custom function for sorting a list of values.  I've tried a few on briandunning.com and have run into problems with each of the ones I've tried:

 

BubbleSort

SortValues

SortList

 

The list of values I am trying to sort is a list of phone numbers and labels.  I have a calc field in my phone numbers table that produces a text value of:

 

Label     (Tab)     Phone Number

 

If the Label or Phone Number field is empty, I insert "No Label" or "No Number" in red using TextColor.  In my Contacts table, I have a calc field that uses the List() function to generate a list of the above calc field from the related phone number records.  I want this list sorted by label.

 

SortList works, but there's an issue with text color where it colors some non-empty fields red too.  I'm going to investigate further, but was hoping someone might know of a function that will work for me.  Thanks!

Outcomes