Skip to main content

I need a way to find certain shapes through formulas. For example I tried =countif(descendants(page) x => itemtype(x) = 'Process') and this does not work. I also need to work with custom shapes that derive from the basic shapes like process terminator etc. so I don't think just going off of names would work. 

Hi @brooklyn h thank you for posting in the community! As a first step I recommend taking a look at our Lucid Formulas documentation which has details on the available formulas and examples.


Just to confirm my understanding are you hoping to use the formulas to find/locate specific shapes that are already on the canvas? If not would you mind sharing some additional detail on your use-case? This will help us better understand what you are hoping to do and share any recommendations or information to help!


Thanks in advance for your help. Feel free to let us know if you have any questions! 


Yes but they use shapes that are already present in the flowchart library not the standard library. The itemtype seems to work well with the standard library for objects like 'block' or 'line' but I need to use the flowchart library or the 'my shared shapes' library to locate certain objects kind of like the LABEL function.


Hi @brooklyn h thank you for sharing that additional information about your use-case! It sounds like you are trying to reference existing shapes in a diagram. Just to confirm are you hoping to locate specific shapes on the canvas in a way similar to using the 'Find & Replace' text search option? Or are you hoping to find the X/Y location of the shape?




If you need to find the specific ID of an object/shape/container you could use LABEL to obtain that ID. You can then reference that object and it's properties in formulas anywhere on your canvas. If we create a new property associated with the shape and add this formula: =LABEL(THIS)

We return the ID of the custom shape (a long string of numbers and letters) - o9NF47DMZrlt. Please see the screenshot below for an example:



This may help you reference or find specific objects in your diagram. 


Let me know if this is not what you are looking for or if you have any questions!


Reply