Skip to main content
1-Visitor
September 30, 2014
Question

Database Service Filtering and populating a datatable from a Database Service

  • September 30, 2014
  • 2 replies
  • 1156 views

I have created a basic Database service and I am returning the data (Select lot_no, item_id from table1). The data is getting populated in a grid in the mashup. Now I would like to use the data filter widget to filter the data that is returned from the service.  For instance where item_id starts with C.  It doesn't appear to filter the data after it has been returned (do I have to have a where clause on the original data that is returned, can't it filter the infotable/datatable after the full dataset has been returned? 

Next question would be what is the best way to populate a datatable from a database service (for instance data the example above). 


Thanks.





    2 replies

    5-Regular Member
    October 1, 2014

    Hi Justin,

    The Data Filter widget has a Query property that can be used as an input to query the resulting InfoTable from the

    Service

     querying the database. You'll want to take a look at the InfoTableFunctions' Query()

    Service

     (available from the +Snippets +tab) which takes an InfoTable and query object as inputs. Ideally, you'll implement it in such a way that you're querying the database once to retrieve the entire data set and further querying will be done on the resulting InfoTable.


    What's your reasoning for wanting to populate a DataTable with data from a database? Why not use your existing database?



    justiny1-VisitorAuthor
    1-Visitor
    October 2, 2014

    I would potentially like to take database information and then further manipulate that data, add other data etc.