Input field with - autocomplete on several attributes and accepting new input?

0
Hello, Has anyone a good idea or solution for the following: The user should be able to create a favorite list. I want to create one input field where the user can search for other registered user or companies on several attributes (ie company name, email). If there is a hit the user add it to the list. If there is no hit the user should be able to enter an email address and add it to the list (the app will then send an invite to the new entry). Any ideas or suggestions? Thanks Fredrik
asked
2 answers
0

I think the way to go is a custom widget in which a refresh microflow is called on every letter that is typed.

You put that widget in a 'Search' object dataview. In the same dataview, you put a list view of 'Results' that is filled by Microflow. In this microflow, you take the search term, retrieve favorites, based on company name, email, etc. and return those favorites.

For adding to the list, you can just make a button next to the Search input field, and next to every Result.

answered
0

Building a search field that queries multiple attributes would require building a 'search' entity that links to all the entities that you want to search. The user submits a search term to an attribute of the search entity. Then, in a microflow, you can do a retrieve object on each entity you want to include with the relevant search term. Finally, you create a searchResult object for each hit and use them to fill a results data grid. The objects themselves can then later be retrieved by association via the searchResult objects.

Having the search field auto-complete would require building a custom widget that kicks off your search microflow on every keystroke.

It's not exactly pretty and it's not out of the box, but it should work as long as your data set doesn't grow out of hand.

answered