Skip to main content
Feb 5, 2020 7:11 AM UTC
Solved

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?

Feb 5, 2020 8:23 AM UTC

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

3 replies

Feb 5, 2020 8:23 AM UTC

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

Feb 5, 2020 8:47 AM UTC

Hello,

 

should i create the service inside the datatable? 

Feb 5, 2020 9:01 AM UTC
Not necessarily, you can create it in any thing, you can find the service in Code Snippets.