cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Database Service Filtering and populating a datatable from a Database Service

justiny
1-Newbie

Database Service Filtering and populating a datatable from a Database Service

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 2
adam11
5-Regular Member
(To:justiny)

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?



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


Top Tags