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

Thingworx mashup to edit/delete/create rows in an InfoTable

hmerkl
1-Visitor

Thingworx mashup to edit/delete/create rows in an InfoTable

I am trying to create a mashup that does simple CRUD operations on an InfoTable. I suppose this is possible. Does anybody know a tutorial or can point me the right direction for accomplishing this?

So far I have managed to bind the table to a grid but I am stuck at modifying the data.

ACCEPTED SOLUTION

Accepted Solutions
supandey
19-Tanzanite
(To:hmerkl)

Hans,since InfoTable is only a datastructure in the memory I think you are looking for persisting this data from the memory to either a DataTable or to an external RDBMS table to store in external database? (That's my assumption when i read through your question where you mention about binding them to a grid and then performing CRUD on that) - correct me if i am wrong.

Whether you are storing them in a DataTable or externally in a RDBMS system you will need services to perform those operation. If you are using DataTable you can utilize some of the inbuilt services of a DataTable

You can also try this video for further help Video Link : 1457

If you are using external DB, for e.g. Oracle or MS SQL, MySQL, you'll need to create your own services with SQL (much like you would do directly on SQL database) and that Service type will required to be of SQL type (SQL Command or SQL Query - depends on what you are intending to do with that Service) for e.g.

To work with external RDBMS you'll have to create a Thing which will inherit Thing Template of type of Database you are attempting to connect to. You can import the extensions from http://marketplace.thingworx.com/Items/Relational-databases-connectors

Hope this helps

View solution in original post

3 REPLIES 3
supandey
19-Tanzanite
(To:hmerkl)

Hans,since InfoTable is only a datastructure in the memory I think you are looking for persisting this data from the memory to either a DataTable or to an external RDBMS table to store in external database? (That's my assumption when i read through your question where you mention about binding them to a grid and then performing CRUD on that) - correct me if i am wrong.

Whether you are storing them in a DataTable or externally in a RDBMS system you will need services to perform those operation. If you are using DataTable you can utilize some of the inbuilt services of a DataTable

You can also try this video for further help Video Link : 1457

If you are using external DB, for e.g. Oracle or MS SQL, MySQL, you'll need to create your own services with SQL (much like you would do directly on SQL database) and that Service type will required to be of SQL type (SQL Command or SQL Query - depends on what you are intending to do with that Service) for e.g.

To work with external RDBMS you'll have to create a Thing which will inherit Thing Template of type of Database you are attempting to connect to. You can import the extensions from http://marketplace.thingworx.com/Items/Relational-databases-connectors

Hope this helps

hmerkl
1-Visitor
(To:supandey)

Thanks! This helps a lot. Using DataTable solves the issue.

One more question: Are you aware of any tutorials that show editing of a DataTable with a mashup?

supandey
19-Tanzanite
(To:hmerkl)

Glad it helped. You can give this a try, lists all the available tutorials  ThingWorx Video Tutorials

Editing is quite straight forward, you can either use the Grid's own functionality of making rows editable by enable the isEditable something like this and then handle the selected and edited values via your services

or you can simply use some value boxes and CRUD buttons on the mashup and bind the data and the action via the respective services, something like this

Just as a side note here, if you're looking forward to storing large amount of data in the Data Table, then you'll be better of with external RDBMS tables due to the performance reasons.

Announcements


Top Tags