How to use text-autocomplete

I’m trying to utilize “text-autocomplete” but am not having much luck.

I note that when I try to define a field as autocomplete, I am prompted to complete the lookup settings.

The field is VARCHAR title in the same table as the form. The table is named tblpersons

I have tried

SELECT title, title
FROM tblpersons
ORDER BY title

and

SELECT title
FROM tblpersons
ORDER BY title

neither of which work.

What;s worse that when I type in the field value and save the record, the field is not saved and returns to blank (empty). Without “text-autocomplete” the field works fine.

I have tried adding DISTINCTROW and DISTINCT, but that causes a code generation error,

Also, the help file document seems wrong as it refers to some earlier version of SC. The properties it mentions are not visible in SC8.1.

Any help here?

Cheers

How about…

SELECT DISTINCT title
FROM tblpersons
ORDER BY title

Use Display title if you want th field to be blank when the form loads

I see now that the “lookup” data needs to be in a separate table. Then it works. So I assume SC’s implementation seemingly will not work if the lookup SELECT is in the same table as the one being edited.

This is in stark contrast to other systems I work with where the idea behind autocomplete is to avoid a lookup table.

Disappointing, IMO.