115
Views
1
Comments
Show the movie genre label in the autocomplete input
Question

I have a MovieDetail screen with a form that has an autocomplete input to search for the movie genre of the movie, and its working fine. However, if the user clicks in an existing movie to acesses for editing purposes I would like to have the autocomplete input filled with the movie genre label, but the autocomplete input appears only with a placeholder "Type or double-click for list". 

Do you know what is necessary to show the movie genre label in the autocomplete input?

Configurations for the autocomplete functionality:

Input properties:
   Name: MovieGenreSearch
   Variable: MovieSearch 


RichWidghet\Input_AutoComplete properties:
    InputWidgetId = MovieGenreSearch.Id
    Destination: MovieGenresAutoComplete


In the MovieGenresAutoComplete action I have an agregate to get the movie genres with a filter:
    MovieGenre.Label like "%" + MovieSearch + "%"


After the aggregate I have the action Input_AutoComplete_ShowList with:
    InputWidgetId: MovieGenreSearch.id
    List: GetMovieGenresAutoComplete.List
        Mapping from MovieGenre to Input_AutoComplete_List
            Label: MovieGenre.Label
            Identifier: MovieGenre.Id

2021-03-04 23-50-05
Alberto Ferreira

Hi John,

Autocomplete works associated with an Input Field:

The text you type, will be stored on this variable.

At the same time, if you change the value of this variable, the input will show it.

So, you need to, for example in Preparation, get the Movie Genre of the current movie, and update the MovieGenreInputVariable:

You can also do it on an Screen Action.

Bonus: If you want to get rid off "Type or double-click for list" text, you just need to change the Input Prompt Property with a string with 2 spaces (or other text beside empty string).


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.