Copy link to clipboard
How do I return the actice name value from a Drop Down Menu? Not the item#, but the name.
The selected names correspond with layer names - and I would like to call them, depending on which item that is chosen.
menuName = effect("Target Country")("Menu");
Pretty sure you can't but the work around would be to write an array in the same order as your dropdown list then use that and the dropdown to pick the array number. Like this:
menuItems = ["Layer name one", "Layer name two", "Layer name three", "Layer name four"];
menuName = effect("Target Country")("Menu").value;
thisComp.layer(menuItems[menuName - 1]).sourceRectAtTime().height;
Thank you Greg1987! I used your suggestion.
I do wish I could retrieve the menu item names somehow - this way it would also serve as a global array of names, which I could use in any layer. Now I need to update several layers, if I add or remove an item from the menu.
Thanks again! 🙂