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

Load Media Entity in a Service

Shashi_Preetham
17-Peridot

Load Media Entity in a Service

Hi, 

How can I load an Image from MediaEntities in the Service? 

Thanks,

Shashi Preetham (psp316r)
1 ACCEPTED SOLUTION

Accepted Solutions

So,

In the Service, I have written the following code:

result = "Thingworx/MediaEntities/ImageName"

And the output of the service should be ImageLink.

 

To display the image in the ValueDisplay, go to the ValueFormat widget property of ValueDisplay and press on the Renderer and State

Shashi_Preetham_0-1664207884620.png

and do the following configuration 

Shashi_Preetham_1-1664207913970.png

Thanks,

Shashi Preetham (psp316r)

View solution in original post

2 REPLIES 2

@Shashi_Preetham ,

 

The media entities have a GetImage() service that returns the image for you.  Hope that helps.

 

Nick

So,

In the Service, I have written the following code:

result = "Thingworx/MediaEntities/ImageName"

And the output of the service should be ImageLink.

 

To display the image in the ValueDisplay, go to the ValueFormat widget property of ValueDisplay and press on the Renderer and State

Shashi_Preetham_0-1664207884620.png

and do the following configuration 

Shashi_Preetham_1-1664207913970.png

Thanks,

Shashi Preetham (psp316r)
Announcements