Category Archives: 14232

Using Custom Property Lists

When you have a shape with a Custom Property/Shape Data List you may want to refer to it from within the shapesheet or an associated shapesheet. The first inclination would be to do a string comparison within the test. My preference is to create a User cell that uses Lookup to convert the text into a numeric value.

So for a list named Relation, the Shape Data row would be:
Name:   Prop.Relation
Type:   1
Format:   “Hostile;Close;Distant”  
Value:   =INDEX(1,Prop.Relation.Format)

So what would be in the Value of the User Property cell User.Relation_nbr? The LOOKUP function would need the string to search for (which is conveniently located in Prop.Relation) and a list to search through. The Shape Data conveniently provides that in the Format cell. So the newly created User Property cell would be.
Name:   User.Relation_nbr
Value:   Lookup(Prop.Relation,Prop.Relation.Format)

So there is no chance the comparison will be done against a misspelled text string because all that information is contained within the Shape Data row and all the comparisons will be numeric. If you do need the chosen text from the list, then you can use the Shape data value.

I am working on a set of Genogram shapes and the various shapes require text the use can understand, but the shapesheet is easier when it deals with numeric values.