26
Views
2
Comments
Solved
Pass search text value to API and autocomplete widget
Question
Application Type
Reactive

Hi,

I am looking to perform a search using a dropdown widget against an API and retrieve the list of possible records in the dropdown list (like an autocomplete) such that user can select only one record on change of text.

This is not a search against a pre loaded list from API but a dynamic search that will retrieve a possible list of records based on user input. Can anyone please recommend what will be best widget to use? I was using dropdown search widget initially but realised that it works with only a pre loaded set of records. Thanks!


2024-02-27 12-57-22
Sam Rijkers
Solution

Hi Anuj,

You should be able to accomplish this by using Dropdown Server Side from OutSystemsUI. Also see the documentation: https://success.outsystems.com/documentation/11/developing_an_application/design_ui/patterns/using_mobile_and_reactive_patterns/interaction/dropdown_server_side/.
Note that this documentation does not include the logic to refresh the list when the search input is changed. You need to add that yourself.

Besides, there is also a forge component that does what you described: https://www.outsystems.com/forge/component-overview/14690/dropdown-server-side-demo.
I haven't worked this component myself, but the Try Now page should give you an idea if it indeed does what you need.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

In addition to Sam's technical answer, you really should check whether the API is fast enough. The user expects auto-complete lists to be pretty fast, with less than 1s delay. If the API takes a few seconds for a roundtrip, this might easily annoy the heck out of the user.

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