Select to view content in your preferred language

Using Layer Name from Contents as Name in Inline Variable

54
1
6 hours ago
Labels (2)
ttw_marine
Emerging Contributor

I am creating a model that uses an iterator to iterate on layers in the map. When naming the outputs of the model, I would like to be able to use the layer name as it is set in the contents pane, rather than the file's name. This way the user can specify the output names in the contents pane before running the model.

E.g. The data's name in the gdb is "Project_SiteBound_v01_250120". In the contents this layer is named "SiteBoundary". Is there a way to ensure "SiteBoundary" is the name of the output?

I have tried using expressions to specify certain characters to give the name, but file names differ so much this doesn't work for every layer in the map.

Any help much appreciated, thank you!

0 Kudos
1 Reply
DavidPike
MVP Frequent Contributor

Can you share more of your Model design etc?  I would guess you've attempted %your variable name% but I'm not sure by what method you're extracting the layers from the map.

0 Kudos