becory
becory

Reputation: 1

How to use Custom Connector search from backend with Combobox?

I have a problem setting ComboBox items property.

I found I can use Office365User.SearchUser({searchTerm: ComboBox1.SearchText, top:20});

and then It can search from Office365User Connector.

but this way can't apply to my Custom connector.

I already create a custom connector and add actions like MyConnector.SearchCategory({keyword: ComboBox1.SearchText}); And then, I set it to my ComboBox items, but it will alert an error message:

Behavior function in a non-behavior property. You can't use this property to change values elsewhere in the app

I think setting Collect(CategoryList, MyConnector.SearchCategory({keyword: ComboBox1.SearchText})); on the OnSelect event is not the right answer for me.

Could you tell me how can I do now? :'(

I want to search from searchText and wait for the list from API.

Upvotes: 0

Views: 323

Answers (1)

mmikesy90
mmikesy90

Reputation: 981

You could try this:

  1. Disable the searching functionality in your combobox.
  2. Create a separate text input for the users to enter search terms. Use the ClearCollect() function in the text input's OnChange property to load O365U results to a collection. Be sure to set DelayOutput to true, otherwise your app will spam API calls for every character entered.
  3. Set the collection to the Combobox.Items property.

Upvotes: 0

Related Questions