This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Joyce Lau
Posted Aug 25 - Read on Facebook

Hey y'all, I've created layers in a for loop that I want to call later individually but their IDs are auto generated. Is there a way to define the ID or call the layer by its name instead?

For example, in a function called during for i in [1..9]
item = new Layer
name: "item_" + i

item_i.onClick or any other time I want to single out that item.

🙏 in advance!

3 Comments

Jordan Robert Dobson

Store them in an array.

Joyce Lau

GG, good idea! I was already pushing them into arrays, it's been a long day...

Read the entire post on Facebook