Reference Selector to very large Entity

0
What is the best way to create a reference selector to a large volume entity/table? I take the example of the Order, OrderLine, Product model. Suppose I have a very large (milions) volume Product entity. I have an OrderLine entity wich need a reference selector to the Product entity, but this is a simple dropdown to millions of products which is not feasible. I need in my OrderLine page a possibility to go to a search page where I can search the Product entity, select search results, which will be related to the OrderLines. How can I do this?  
asked
3 answers
3

Reference selectors allow you to set a selection page. This basically allows you to do exactly what you need, the only downside is that you need to open an extra popup page to do the selection/search.

answered
2

Joost,

One approach you could take:

  • Create a page with a dataview pointing to Orderline
  • Inside of the dataview, add a Datagrid pointing to Product entity
  • Set the datagrid to wait for search and add the appropriate search fields (product number, product name, etc.)
  • Create a microflow that takes two input parameters:  Product and OrderLine.  In the microflow, set the association between OrderLine and Product with your parameters.  Also, you can close the page or do other activities according to your business requirements.
  • Create an action button in the control bar of the Datagrid you created that calls this microflow.  You can make this the default button if you would like to so that  the user clicks once or twice on the relevant line in the datagrid and the product is chosen

You could also accomplish this using the Listview in your page in a similar fashion.  Listview enables you to set a microflow that is invoked on click.  The advantage of the listview, IMO, is the combined search box which can search multiple fields at once and resolves searches as the user types.

One other idea - there is an Input Reference Selector widget in the appstore that might work for this.  I have not used this widget in a scenario where there are millions of products so I don't know if you would run into performance issues due to the large number of records.

Hope that helps,

Mike

answered
0

Hi Pieter and Mike, the selection Page on the reference selector was exactly what I was looking for, thanks for your kind help.

answered