Skip to main content
1-Visitor
December 20, 2022
Solved

passing selected values from dropdown to service parameter . . .

  • December 20, 2022
  • 1 reply
  • 1836 views

Hi there -

We're on Thingworx 8.5.15.  I have a mashup that contains a dropdown widget.  I have a service that is used to populate the available choices for the dropdown.  I want to pass the selected values (plural) of the dropdown as a parameter to a second service for processing.  The second service takes a parameter of type String.  In this thread, @Ashritha states that it's a simple matter of binding the Selected Rows property of the first service as a parameter to the second service.  When I try this and log the parameter values received by the second service, I find that it only receives a single String value for processing.

 

What must be done in order to pass multiple values to a service parameter and receive multiple values as a service parameter?

 

thanks in advance,

dgg

Best answer by TravisPickett

Hello @dgg,

 

The parameter for your second service should be of type InfoTable and the DataShape of this InfoTable should match the output of the first service.  Make sure you bind the whole SelectedRows table and not an individual column.

 

Thanks,

 

Travis

1 reply

12-Amethyst
December 20, 2022

Hello @dgg,

 

The parameter for your second service should be of type InfoTable and the DataShape of this InfoTable should match the output of the first service.  Make sure you bind the whole SelectedRows table and not an individual column.

 

Thanks,

 

Travis

17-Peridot
December 28, 2022

Hello @dgg 

 

Adding to Travis's post, this is what the connections could look like:

 

jensc_0-1672217475691.png

 

You could also use the "SelectedItems" property of the dropdown widget, however I have had more luck with the "Selected Row(s)" from the service.