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

Get media name dynamically from a service

Tomellache2B
14-Alexandrite

Get media name dynamically from a service

Hello, community,

 

How can I get a media name in a script?  The aim is to get the descriptions of images from dynamic media. Meaning not just from one image but from different images. I have the code below, is there are snippets that I can use to achieve this?

 

// description: STRING
var mediaName = (a snippet required)
let description = MediaEntities["RampConveyor"].GetDescription();
let result = description;

 

your suggestions will really help thank you.

Jay_nisa

1 ACCEPTED SOLUTION

Accepted Solutions

Sathishkumar_C_0-1660623925581.png

you can pass dynamic media name as a service input. If this is not useful, please explain further on your usecase.

 

View solution in original post

3 REPLIES 3

MediaEntities[mediaName].GetDescription();

 

You can get a media description with above code.

 

Where are you from trying to get a dynamic media name?

Hi @Sathishkumar_C 

This does : 

            MediaEntities[mediaName].GetDescription(); is correct.

It gives me the description of the specific media. In the event where I would want to reuse this service to get the description for another media, I do not want to keep going back to change the media name. So my question is how can I get a media name for different media (images to be precise)? 

 

Sathishkumar_C_0-1660623925581.png

you can pass dynamic media name as a service input. If this is not useful, please explain further on your usecase.

 

Top Tags