Query Model for Rows and display results in html table - using javascript

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Using javascript, I can get a model, and traverse the model and write the field values to an HTML table, all in javascript.  Now, instead of listing all the rows in the model, I created a text box and button using javascript and using the value entered in the text box, search or query the model for the value. For example if I enter "123 Main Street" for the address, I want to search/query the model on the address field = "123 Main Street". How can this be accomplished using javascript?
Photo of Glenn Shesney

Glenn Shesney

  • 230 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Andrew Duensing

Andrew Duensing, Employee

  • 740 Points 500 badge 2x thumb
It seems like a lot of the functionality you are creating here is what Skuid already allows you to do without code; I'm having trouble seeing how this is different than creating a table or queue and using the search box.

 Perhaps you could provide a little more context for the situation you are describing.
(Edited)
Photo of Glenn Shesney

Glenn Shesney

  • 230 Points 100 badge 2x thumb
One glaring feature missing from SKuid is the ability use auto complete/lookup to add a new record when no matches have been found. From what I see, when no matches have been found the value entered disappears and/or no option appears to create a "new" record using the value entered. If its there, please point me in the right direction, otherwise I want to try and implement something in javascript that will display an "Add New" button and use the value entered in the search box. The html table, button and search box are done as well as retrieving ALL the records from the custom object. Now I need to either filter the rows in the custom object OR search the custom object with the values entered in the html input box.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Glenn.  A fellow forum member mapped out a pretty decent model for this behavior here: https://community.skuidify.com/skuid/topics/how-to-allow-search-for-existing-accounts-before-adding-...

Its in the mobile builder, so there are some differences, but I think you could apply the principles. 
Photo of Glenn Shesney

Glenn Shesney

  • 230 Points 100 badge 2x thumb
Thank you for replying. I reviewed the link and unfortunately I need the search capability for the "Deck" in the mobile layout to be in the desktop layout. Anyway I can incorporate the same approach in a desktop page?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Build similar functionality on a skuid table (for the desktop builder) instead of the Deck.