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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Send the selected list item to a table

gourinaik98
8-Gravel

Send the selected list item to a table

I have created a DataShape having 3 field definitions and binded the GetFieldDefinitions service to the list widget. Now i want to send the selected item in the list to a datable or a database. how do i do that?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

Create a service with input infotable (this is coming from SelectedRows of the list). In this service you can add info in a datatable already created, with service AddorUpdateDataTableEntry. Unfortunately, there is no service that creates datatable that I am aware of.

Same can be achieved if you want to insert data in a Database (you need a Database Thing that is connecting to the database), providing SelectedRows as input to a service, iterate through infotable and insert field/value in database.

Make sure ValueField property of List widget has the correct value (it should be the name of the field in your case).

 

Hope it helps,

Raluca Edu

View solution in original post

3 REPLIES 3

Hi,

 

Create a service with input infotable (this is coming from SelectedRows of the list). In this service you can add info in a datatable already created, with service AddorUpdateDataTableEntry. Unfortunately, there is no service that creates datatable that I am aware of.

Same can be achieved if you want to insert data in a Database (you need a Database Thing that is connecting to the database), providing SelectedRows as input to a service, iterate through infotable and insert field/value in database.

Make sure ValueField property of List widget has the correct value (it should be the name of the field in your case).

 

Hope it helps,

Raluca Edu

Hello,

 

should i create the service inside the datatable? 

Not necessarily, you can create it in any thing, you can find the service in Code Snippets.
Top Tags