Autosuggest By Field Label

Issue #1939 new
Menachem Mendel Shanowitz created an issue

One of the most annoying hindrances to development is when the field label and api name are mismatched. Unfortunately, this tends to happen a lot, usually due to a requirement down the road to change the field label and the API name is left alone due to the inconvenience of changing it.

If you can make that when there is a mismatch (accounting for the replacement of spaces with underscores), the auto-suggested fields show the label in parentheses and it shows up as an autocomplete suggestion based on the label text, it would be a big productivity booster.

Comments (4)

  1. Scott Wells repo owner

    If I understand correctly, you're either wanting SObject field code completion suggestions to include the label text, or you're actually wanting to have completions included based on the field label text that, when selected, insert the field name. Is that a correct understanding?

  2. Scott Wells repo owner

    Thanks for confirming. I'll need to think about this a bit as there are two places where auxiliary information can be added for code completions and both are currently already in-use, the tail text for the field's namespace if from an installed package and the type text for the field's data type, e.g.:

    Issue_1939.png

    As a result, there's not really a good place to put the field's label text. I might be able to add it as part of the tail text so that it looks like:

    FieldName__c (namespace) 'Label Text'     DataType
    

    and since most fields don't have a namespace, it'll really look like the following most often:

    FieldName__c 'Label Text'                 DataType
    

    As for adding completions by field label, I'd prefer to see if I can get the approach above working properly first as that's a very non-standard way to present code completions. However, there is an existing precedent with picklist fields where completions are available for the textual values.

    Let me play with it a bit and see what might make sense...

  3. Log in to comment