locked
Custom Search in HTML Lightswitch RRS feed

  • Question

  • Hi everybody, i searched a lot and didn't found a tutorial that's work to create a custom browse screen in lightswitch html, i need to search by int and date fields only .

    How is the easy way to do this ? 

    Friday, May 9, 2014 2:20 PM

Answers

  • Which didn't work the param query or the Filter Hack?

    If you implemented the code in the Filter Hack correctly, then it's a matter of getting the OData filter string syntax correct.  There is a link the post to Odata spec.

    Tell us about the fields you'll be searching.  Do you know in advance which date and number fields that you want to search?  If so, add parameters to the query then use them to define filters on the date and number fields respectively.

    HTH,

    Josh


    • Edited by joshbooker Friday, May 9, 2014 5:22 PM
    • Marked as answer by Angie Xu Tuesday, May 20, 2014 1:11 AM
    Friday, May 9, 2014 5:20 PM

All replies

  • If you know the fields you'd like to search in advance, you could use a parameter query with optional parameters.

    Or you could enable custom odata filters like this: LightSwitch HTML Client Filter Hack

    HTH,

    Josh

    • Edited by joshbooker Friday, May 9, 2014 5:21 PM
    Friday, May 9, 2014 4:39 PM
  • Hi, i tried but it didn't work for me .

    I need to make a custom search where in the screen have one calendar to select the date, and a fill-in to inform a number, and then make the search using those 2 parameter .

    Friday, May 9, 2014 5:10 PM
  • Which didn't work the param query or the Filter Hack?

    If you implemented the code in the Filter Hack correctly, then it's a matter of getting the OData filter string syntax correct.  There is a link the post to Odata spec.

    Tell us about the fields you'll be searching.  Do you know in advance which date and number fields that you want to search?  If so, add parameters to the query then use them to define filters on the date and number fields respectively.

    HTH,

    Josh


    • Edited by joshbooker Friday, May 9, 2014 5:22 PM
    • Marked as answer by Angie Xu Tuesday, May 20, 2014 1:11 AM
    Friday, May 9, 2014 5:20 PM
  • Uhh thanks, i got it now .

    Friday, May 9, 2014 7:38 PM