Skip to main content
pshashipreetham
18-Opal
18-Opal
September 26, 2022
Solved

Load Media Entity in a Service

  • September 26, 2022
  • 2 replies
  • 1403 views

Hi, 

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

Thanks,

Best answer by pshashipreetham

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,

2 replies

17-Peridot
September 26, 2022

@pshashipreetham ,

 

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

 

Nick

pshashipreetham
18-Opal
pshashipreetham18-OpalAuthorAnswer
18-Opal
September 26, 2022

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,