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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

passing selected values from dropdown to service parameter . . .

dgg
12-Amethyst
12-Amethyst

passing selected values from dropdown to service parameter . . .

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

ACCEPTED SOLUTION

Accepted Solutions
TravisPickett
12-Amethyst
(To:dgg)

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

View solution in original post

3 REPLIES 3
TravisPickett
12-Amethyst
(To:dgg)

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

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.

 

dgg
12-Amethyst
12-Amethyst
(To:TravisPickett)

Hey @TravisPickett -

I changed the input type of the service to InfoTable of the same DataShape, refreshed the mashup, and mapped the Selected Rows attribute itself (as opposed to the underlying column of interest) to the input parameter of the second service.  The service now works.  I knew it was something stupid that I was missing.

 

I really appreciate the help.  And thanks @jensc for the image - that helped too.

dgg

Announcements


Top Tags