def getSortOnName(prefix=None):
    """convert the table prefix to the 'sort on' name used in forms"""
    # useful for code that wants to get the sort on values themselves
    sort_on_name = 'sort_on'
    if prefix is not None:
        if not prefix.endswith('.'):
            prefix += '.'
        sort_on_name = prefix + sort_on_name
    return sort_on_name