Edit the properties from the data base properties

Started by peterpanic, July 05, 2008, 09:06:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

peterpanic

Hi all,

I have the following requirement and don't have the knowledge to implement it!

I have within an entiy three items in the Database properties A, B, and C each Itmem has a number of custom properties associated with it e.g A( a1,a2,a3....a5) B(b1,b2...b10) etc...

I would like to only see the custom properties associated with the Database item when it is marked as a PK or required or both what ever is easier to implement, i.e. the tick box should act as a trigger to dynamically change the custom property window.

so if A,B and C are database items (defined in database properties in an entity diag) and only B is marked as PK then I'd like only to see a1,a2..a5 in the customs property window for that entity.

is this possible

peter :'(

Lars-Erik

I've split the topic this was posted in. So now it's a topic and not a reply to a topic that had nothing to do with it.

If i understand your question, this should be possible. Using the database to fill an invisible property, that is set to A, B or C.
The second step would be to hide of make custom properties visible depending on the value in the hidden property above (the one with A B or C in it)

Use your shapes shapesheet to set the "Invisible" cell to something like this: =IF(Prop.abcCell = "A", 1, 0)

That way if you link you database item A to the shape only the custom properties that belong to A should show up.
The other properties will still be there, but hidden. If you want to remove and add properties, you will have to use VBA.
If hiding the properties will be enough, no VBA should be needed.

- Lars

Visio Guy

Peter,

Did you add the custom properties to the shapes yourself?

I dropped an Entity shape on a page, and added some fields, but I didn't see any custom property (Shape Data) fields in the shape.

Are you using the term "custom properties" to mean the fields added to shapes via the Data menu (or Shape menu in earlier versions)?

I'm not *exactly* sure what you mean from a very nit-picky, Visio-geek perspective :)
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

peterpanic

Hi All,

thanks for the Tips so far and sorry for the confusion I'll try to explain what I did and What I want. I'm using Visio 2003 but could upgrade to 2007 if it helps!

1) I first create an entity
2) I then create a Database (Db) Items for that Entity A,B and C
3) I Then select on A in database properties and Create the custom properties to be associated to that database item i.e For Db Item A I create [ a1,a2,a3..etc]
4) For Db Item B I create [b1,b2,b3,b4..etc] and for C I create, in custom properties, [c1,c2,c3..etc]
5) When I click on the entity within the custom properties window I don't want to see anything unless A,B or C are ticked/selected as 'required or as PK' within the database properties (only one of these need act as the trigger to display the associated custom properties).

test if system working

1) Click on entity with no tick boxes in Database properties 'ticked/selected' either required or PK result: Custom properties window for entity should be empty - all invisible!

2) Click on entity and 'tick/select' Db A as required or PK (which ever does the trick, only one trigger required) in database properties. Result: a1,a2,a3..etc now visible in entity 'custom properties window Success!

3) Click on entity and unclick/deselect Db A from database properties (required or Pk which ever was used as trigger) and click Db B required or PK result: a1,a2..etc dissapears form Custom properties window being replaced by b1,b2,b3! in custom properties window

4)Click on entity and leave Db B 'clicked' and additionally click on Db C in database properties result: entity Custom properties no shows b1,b2,b3..etc and c1,c2,c3..etc

Hope this helps your understanding Visio Guy!



peterpanic

By Database (Db) I mean items added in th Database properties window. Also I create the shape custom properties, for each Db item; using the add custom properties menu!

Lars-Erik

Short on time... but i threw together a small ... well tutorial is not the right word... but here it is

tadaaaaa

Lars-Erik