Forms. How to make a search for a field, i.e. a list with a search through a database access (autocomplete)

In the form column settings, specify List-search.

In GetItem, the field is extracted as the entity name, not the key.

Implementing a procedure like fm_formCode_fieldCode_dict (editing via the interface).

CREATE PROCEDURE [dbo].[fm_isp_region_dict]
  @username nvarchar(256),
  @itemID nvarchar(128),
  @q nvarchar(128) = ''

    if(isnull(@q, '')='') begin  -- (for usual select)
        select ' Not selected ' Text, 0 Value, 0 Selected
        SELECT Text, Value, 0 Selected
        FROM dbo.as_geo_regions gr        
        order by Text
    else begin
        select ' Not selected ' Text, 0 Id, getdate() date, '' [desc], 0 type
        SELECT Text, id, getdate() date, '' [desc], 0 type
        FROM dbo.as_geo_regions gr
    where name like '%'+@q+'%'
    order by Text

An important difference is that the optional parameter @q nvarchar (128)=’’.

When saving the SaveItem field, we are passed the entity name (not the foreign key)):

CREATE PROCEDURE [dbo].[fm_profile_saveItem]
   @username nvarchar(256),
   @itemID  nvarchar(256),
   @fieldemail nvarchar(256) = '',
   @fieldphone nvarchar(256) = '',
   @fieldcity nvarchar(256) = '' -- на входе текст а не ключ-число
    update as_users
        regionID=(select top 1 id from as_geo_regions where name=@fieldcity)
    select 1 Result, 'Сохранено' Msg

As a result, the field can be set through the search for values in the form and adjust how data will be generated in this search.

Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started

SQL-tool for creating personal accounts on the site

The essence of the approach and the history of the creation of Falcon Space
Web platform for creating personal accounts

Falcon Space Platform

This is a reduction in the cost of ownership

at the expense of fewer people to support

This is a quick change

while using the program

This is a modern interface

full adaptation for mobile devices

MS SQL web applications. Affiliate program for developers and web studios

You can develop on your own or collaborate with us on Falcon Space web development using only SQL and HTML.
See examples with SQL code
Platform documentation
Working on MS SQL Server