Autocomoplete record definition

I want to use the autocomplete in the outsystems 8. 

The autocomplete is to searchg for countries. I have a local variable "CountrySearch" and in the autocomplete OnNotify I have a query with the filter "Country.Name like "%" + CountrySearch + "%". 

Now it seems that is necessary to create two local variables, one record and one record list, with "Record Definition" set to Input_AutoComplete_ListEntry. However Im not understanding what this Record Defition is and what should be set for it. For the "Input_AutoComplete_List" the Record Definition is "Input_AutoComplete_ListEntry", but Im not understanding why this configuration should be like this.

 For the Input_AutoComplete_ListEntry Im dont know what the Record Definition should be.

 Can you explain better how this works and what should be the correct Record Definition for each local variable?


Have you checked this page or this one?

With the local variable Input_AutoComplete_ListEntry Record Definition set as "Country" in the ListAppend appears an error "The same Record data type required. Expected Input_Auto_Complete_ListEntry instead of Country. 

The ListAppend is like this: RecordList Input_AutoComplete_List Record Input_AutoComplete_ListEntry

Well as the error says you need to have the same definition. 

Since you are using a (very) old version you don't have the current direct mapping options, so you have two options: use an advance query where you can use the record definition you want or the other option that is making the mapping your self by assigning a record and append.

For obvious reasons, I would go to the advanced query option.

Thanks but my doubt is about how that manual mapping and record definition works. 


If you want to map Country into the Input_AutoComplete you need to have a record of that type and assign the fields you need (Id, Label) with the fields from Country (Id, Name)  and make an append. Don't forget that in this case, you need to iterate the country list in order to append all records.


Thanks but I already have that I have a foreach "GetCountriesAutocomplete.List" then an assign inside the foreach: 

Input_AutoComplete_List.Current.Input_AutoComplete_ListEntry.Label = GetCountriesAutocomplete.List.Current.Country.Name 

Input_AutoComplete_List.Current.Input_AutoComplete_ListEntry.Identifier = GetCountriesAutocomplete.List.Current.Country.Id 

And then a ListAppend with:

 RecordList: Input_AutoComplete_List 

Record: Input_AutoComplete_ListEntry (here is where it shows "The same Record data type required. Expected Input_Auto_Complete_ListEntry instead of Country.")

Can you provide an image of Record definition and the List?