Skip to main content
Mar 11, 2020 10:40 AM UTC
Question

Regarding Image

Hii,
I stored all images in thingworx repository.  I used services in thing to get the image.  But, I can't able to bind that services in image widget.. I attached my screenshot below, please help me to do that.What i expected is whenever i click the data in tree widget, the image should change dynamically, 

 

Services:

var result = "http:///Thingworx/FileRepositories/RepoImage" +FileName;

3 replies

Mar 11, 2020 7:46 PM UTC

Make sure that the result output basetype matches with what the Image widget expects (I think it might work as String)

Then based on your selectedrow you can drag and drop that on the image widget.

DMu3Author
Mar 12, 2020 9:48 AM UTC

Hello,I tried, then also it doesn't work.  I read one article, they mentioned to create datatable, so i created datashape, and datatable, in mashup i called value display widget, i used getdatatableentries services, but i can't able to view the image dynamically, if i click any data in tree, it always shows first image. please help me to do this task.

Thank you in advance,

Mar 12, 2020 11:38 AM UTC

Hello @DMu3,

 

There are two issues with your code:

  1. FileName is undefined
  2. You need "/" after RepoImage, like that: ...FileRepositories/RepoImage/" +FileName;
     

Regards,
Constantine