How to set Predefined value to the AutocompleteTextview with javascript


I have one autocompletetextview with customer names and I want to set predefined customer name to textfield of autocompletetextview .as that customer name is already in array which I am using for loading autocompletetextview.but as I am working with edit page I want to load Previously selected Customer name in autocompletetextview.
Please help to set predefined value to autocompletetextview.


You can use the addToken method, examples can be found here.


I tried with Add token method but Some Undefined function e error is
giving. I want to show selected value to autocomplete text view I have that
values statically for example I have customer Name “1.Akshay Doiphode” I
want to show this in Text field of Autocomplete Textview.
Please Help.
Thank you in advance


I suggest you to create a playground example where we can reproduce your issue.


I am Using XML as:

<au:RadAutoCompleteTextView items="{{ items }}" suggestMode="Suggest"

displayMode=“Plain” completionMode=“Contains"
onSuggestionViewBecameVisible }}” id=“autocmp” hint=“select Customer(min 3
letters)” >
<au:SuggestionView suggestionViewHeight=“150”>


for This autocompletexview I am Loading data from some URL in same case Now
I have One customer Name with me which I want to show as selected In
autocomplete textview’s textfield.

I am Loading data as:

autocmp = page.getViewById(“autocmp”);
autocmp.loadSuggestionsAsync = function (text1) {
var promise = new Promise(function (resolve, reject) {
http.getString(“” + text1).
then(function (html) {
var data= JSON.parse(html);
var items1 = new Array();

              for (var i = 0; i < data.length; i++) {
                    console.log("DATA ID"+data[i].id);

, function (error) {
console.log("Error: " + error);
else {
return promise;

Thank you