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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Invoking a Thingworx Service multiple times

SaranKarthick
16-Pearl

Invoking a Thingworx Service multiple times

Hi developers,

 

I have a requirement where the user can select multiple things from a list and a particular service should be invoked for all the things. The issue I have is, for each and every thing i need to execute the service individually. I need to execute it continuously for all the things. Please advice.

 

Thanks and Regards,

Saran

ACCEPTED SOLUTION

Accepted Solutions

You will either have to use a Collection or in older versions a Repeater widget to show multiple Nav buttons

Or show the links in a Grid or List

In your setup, I might almost just add the link onto the payload of the Things that the user can select from and show that in a Grid so they can click the link within the grid to navigate.

Sorry if that totally doesn't match your use case.

My initial answer was more for Server side execution of the links, but if you have to return URLs then perhaps some of what I mentioned can help.

View solution in original post

6 REPLIES 6

You can pass in the selected Things as an info table

then loop through the infotable

and invoke your service with that Thing as an input parameter

Now if you need to very dynamically invoke you can use

Things(ThingName)(ThingServiceName({Parameters}))

(or something similar)

Hi @PaiChung,

 

Thanks for your reply. The issue here is the Service will take the thing name and provide a url link. This url link is passed to a link widget. So if i pass the list of things as an infotable, the the result url will be for the last item of the infotable. Even if i make the result to be an infotable of respective urls the link widget can only take one at a time and it can be executed only once. So i need to execute the service multiple times in the run time of the mashup.

Hope i had provided a clear picture of my issue. 

Thanks and Regards,

Saran

You will either have to use a Collection or in older versions a Repeater widget to show multiple Nav buttons

Or show the links in a Grid or List

In your setup, I might almost just add the link onto the payload of the Things that the user can select from and show that in a Grid so they can click the link within the grid to navigate.

Sorry if that totally doesn't match your use case.

My initial answer was more for Server side execution of the links, but if you have to return URLs then perhaps some of what I mentioned can help.

Hi @PaiChung,

 

The repeater widget solved the problem. Thanks for your help.

 

Regards
Saran

Is there any means to get the response url written in a file?

PaiChung
22-Sapphire I
(To:KavithaR)

Can you describe a little more what you are doing?

Is this still something you need to do client side vs. server side?

Announcements


Top Tags