Convert data entry field to predictive lookup

Hi
I’ve made my data fields and entered data into the table. I would now like the fields to do predictive lookup of a previously entered name so I don’t have to type it in all the time in full. How do I do this? The fields are primarily all text fields. This is in Base

Thanks

Okay so I’ve tried a different approach as I’m quite a newb at this. I took individual columns of data and made them into separate tables. Now I want to create an input form that when I start typing in a field will look up any records in the related table to resolve the entry. Form>Name Field>query Table ‘Names’= Bob Smith. If this makes any sense. Thanks for any help

You could enable autocomplete under settings or set cells to be validated by the very same set of cells (but not to display error message so you can still enter new values).

Hi @mahfiaz, I think she/he is asking about base not calc.

@mariosv - I think you are right, I somehow missed the hints, probably because I have never found a use for Base.

If you are using the embedded HSQLDB then what I’ve done in a case like that is use a select statement like:

SELECT LNAME FROM NAMES WHERE LNAME LIKE CONCAT(:LNAME,'%')

The concat statement prompts for a string and uses it to construct a wildcard so you can enter the first few characters of the last name and retrieve either the record or a short list of matching records.

Slow Motion:

I would now like the fields to do predictive lookup of a previously entered name so I don’t have to type it in all the time in full.

I would suggest you use a COMBO BOX or maybe a LIST BOX in your FORM to do what you need. Both tools allow ‘predictive lookup’ (i.e. typing the first few letters to get to the desired item or region of your list).

There are important functional differences between these two tools however, so you should study the tutorials first to see which one is appropriate for you. Generally, selection from a COMBO BOX writes the value of the selected item into the appropriate field of your table, while selection from a LIST BOX writes the selected item’s associated ID value as a foreign key to appropriate field of your table.

Both types of boxes require a DATA SOURCE such as a table or an SQL query to ‘populate’ the visible drop-down list - see HERE.

Here’s a short video showing how to add a COMBO BOX to a Base form. Here’s a short general Base Tutorial showing how to create a COMBO BOX.