Skip to main content
Mar 29, 2025 1:27 PM UTC
Solved

Counting shapes inside a container from outside the container

Hello,

Somewhat new user here. Been using lucid for a while but just getting into formula’s.

 

I have a container with 2 shapes in it. I’m trying to get a count of the number of shapes within the container from a label that is placed outside the container. The container has a shape id of “MyTeam”.

 

I can put a title on the container with the formula =COUNT(CONTAINED) and it works and displays 2 as the count.

 

When I attempt to do this outside the container is where I run into problems. I’ve tried the following….

 

=COUNT(#”MyTeam”.CONTAINED)

This results in an error saying 

"CONTAINED" was not found in "PCL5j ikY4cLF"

 

If I just reference =#”MyTeam” from my label it displays the containers name so the reference seems to work.

 

I tried to wrap it in a container object like below…

=COUNT(CONTAINER(#”MyTeam”).CONTAINED)

This does not error however the count displays as 0 on the label.

 

Thanks in advance for any help!

aparrish
aparrishAnswer
Lucid Legend Level 8
Mar 29, 2025 7:57 PM UTC

​@jdul someone else asked a similar question a couple years ago. Here’s the thread:

 

Comments

aparrish
Lucid Legend Level 8
aparrishLucid Legend Level 8Answer
Lucid Legend Level 8
Mar 29, 2025 7:57 PM UTC

​@jdul someone else asked a similar question a couple years ago. Here’s the thread:

 

Translate