locked
HTML Client: How to handle lookups with millions of records RRS feed

  • Question

  • Assuming I have a lookup table with over a million records called Diagnoses, and I have a RIA service entity on top of it called DiagnosisDTO.

    I also have a query that takes a search string and returns an IEnumerable<DiagnosisDTO>, it does an efficient search over the million records using SQL Server's Full Text Index search (https://msdn.microsoft.com/en-us/library/ms142571.aspx)

    Now how do I create a lookup control for a DiangosisDTO property in the HTML client that uses my efficient query? Like this:

    Saturday, June 11, 2016 2:59 PM

All replies

  • Hi Ahmad Akra,

    According to your description, you are using RIA service to filter the Diagnoses records, so I assume you are using a external data base which using RIA service to communicate with the LightSwitch HTML application.

    Please add the RIA service as the LightSwitch data source. Then please add a query for this data source which need to set the search parameters for this query.

    After creating query for this data source, please add this query to your screen through Add Data Item button on screen editor. Then please add a custom control and bind this query to the control.

    Detailed steps, please refer to the Querying Related Entities part in following blog. Hope that can help you.

    https://blogs.msdn.microsoft.com/bethmassi/2013/11/27/beginning-lightswitch-in-vs-2013-part-4-too-much-information-sorting-and-filtering-data-with-queries/

    If misunderstanding, please feel free to let me know.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 14, 2016 1:44 AM
    Moderator
  • Dear Weiwei,

    Thanks for your help. 

    I am familiar with all those steps, but the part that stumps me is how to do the auto-complete custom control and bind it to the query.

    Best wishes,

    Tuesday, June 14, 2016 3:13 PM
  • Hi Ahmad Akra,

    Please refer to following article which introduce about how to use auto-complete-box to filter data. Hope that can help you.

    https://www.syncfusion.com/kb/4321/how-can-i-use-auto-complete-and-dropdown-controls-with-the-odata-services

    But this article comes from third part site, Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on
    these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 15, 2016 3:22 AM
    Moderator
  • This is awesome,

    All examples from Syncfusion are such that the typed input performs a sequential search over all entities using (text LIKE '%Search Term%') which will be too slow with a million records. I need it to use my parameter for the RIA service Query because with that parameter I use FULL TEXT INDEX, and can return results instantly no matter how big the table.

    Sorry if it's trivial to do, but I'm still learning my way through HTML and JS. Thanks for your help

    Wednesday, June 15, 2016 6:48 AM
  • Hi Ahmad Akra,

    I will create a sample project to emulator your situation and try find out how to implement your requirement. There might be some time delay. Appreciate your patience.

    Thanks for your understanding.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 16, 2016 10:18 AM
    Moderator