Hey there, i have just the concept for you! I will give you the rough outline:
The concept is based on the combination of a SearchFunction entity and SearchResults with Associated entities that you found
- Create a non persistent entity for a searchfunction
- string for search value
- boolean for showing results condition
- Create a non persistent entity for searchresults
- string attribute for the display value
- Association to entity you want to select
- Association to searchfunction entity
- Add a dataview with a datasource microflow to create the searchfunction entity
- Add a textbox for the search value
- Add an on change flow that uses the search value to run a contain() function within a Xpath database retrieve in which you search on the values you want to match
- f.e. if you want to check on first names you would do something like: contain($entity/firstname, $searchfunction/searchvalue)
- All found results are iterated into search result entities and linked to the searchfunction entity and the original entity (so you can find the result later)
- Add a listview underneath the textbox
- conditional visibility for showing the listview
- on click flow that retrieves the entity associated to the search result and sets the association
This is somewhat the outline, you could build it in such a way that you can reuse it in different places