• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

bVisual

  • Home
  • Services
    • How Visio smartness can help your business
    • Visio visual in Power BI
    • Visio Consulting Services
    • Visio Bureau Services
    • Visio Training and Support Services
  • Products
    • Visio Shape Report Converter
    • SS Plus
    • LayerManager
    • visViewer
    • Metro Icons
    • Rules Tools for Visio
    • The Visio 2010 Sessions App
    • Multi-Language Text for Visio
    • Document Imager for Visio
    • multiSelect for Visio
    • pdSelect for Visio
  • Case Studies
    • Case studies overview
    • Using Visio in Education for GIS
    • Visualizing Construction Project Schedules
    • Visio Online Business Process Mapping
    • Nexans Visio Template
    • CNEE Projects, WorldCom
    • Chase Manhattan Bank
  • News
    • Recent news
    • News archive
  • Resources
    • Articles➡
      • ShapeSheet Functions A-Z
      • Comparing Visio for the Web and Desktop
      • Customising Visio Shapes for the Web App
      • Key differences between the Visio desktop and web apps
      • Using the Visio Data Visualizer in Excel
      • Using Visio in Teams
      • Creating Visio Tabs and Apps for Teams with SharePoint Framework (SPFx)
      • Designing Power Automate Flows with Microsoft Visio
      • Innovative uses of Visio Lists
    • Webcasts ➡
      • Visio in Organizations
      • My session and other Visio sessions at MSIgnite 2019
      • Power up your Visio diagrams
      • Vision up your Visio diagrams
      • The Visio 2010 MVP Sessions
    • Visio Web Learning Resources
    • Books➡
      • Visualize Complex Processes with Microsoft Visio
      • Mastering Data Visualization with Microsoft Visio
      • Microsoft Visio Business Process Diagramming and Validation
      • Visualizing Information with Microsoft Visio
  • Blog
    • Browse blog articles
    • Visio Power BI articles
    • Visio for Web articles
    • A history of messaging and encryption
  • About us
    • About bVisual
    • Testimonials
    • Bio of David Parker
    • Contact Us
    • Website Privacy Policy
    • Website terms and conditions
    • Ariba Network
You are here: Home / Visio / Creating Visio Validation Rules for Graph Database template

Published on February 14, 2018 by David Parker

Creating Visio Validation Rules for Graph Database template

Having developed Node and Edge/ Dynamic connector masters shapes for creating Node and Edge table entries for a SQL Server 2017, I decided that I should write some validation rules. The validation feature has been in Visio since the 2010 edition, but is underused, even though I wrote a book about them … see  Microsoft Visio 2013 Business Process Diagramming and Validation . I think that only six rules are necessary to validate that a page with Node and Edge shapes is well constructed before attempting to update the tables in SQL Server, or any other GraphDatabase.

In the above screenshots, I have presented an issue for each rule. The panel on the right Follow the link earlier to read more.
Most of these rules are possible because I ensured that the Node shapes have the category “GraphNode“, and the Edge shapes have the category “GraphEdge“. This allows for testing of the relevant shapes using the HASCATEGORY() function. Some rules are for checking that shapes are correctly connected – basically a Node shape must be connected to another Node shape (or itself) with an Edge shape. The other rules are checking that required Shape Data row values have been entered.
That’s it, so why are Visio validation rules not being used more?
Here are the rules in full:

ID1
NameUUngluedConnector
CategoryConnectivity
DescriptionEdge connector shape is not glued to a Node shape at each end.
RuleTargetShape
RuleFilterHASCATEGORY(“GraphEdge”)
RuleTestAGGCOUNT(FILTERSET(GLUEDSHAPES(3),
“HASCATEGORY(“”GraphNode””)”))=2
ID2
NameUTooFewConns
CategoryConnectivity
DescriptionEach Node shape should have at least one Edge shape connection.
RuleTargetShape
RuleFilterHASCATEGORY(“GraphNode”)
RuleTestNOT(AGGCOUNT(FILTERSET(GLUEDSHAPES(1),
“HASCATEGORY(“”GraphEdge””)”))+
AGGCOUNT(FILTERSET(GLUEDSHAPES(2),
“HASCATEGORY(“”GraphEdge””)”))) = 0
ID3
NameUNoNodeValue
CategoryData
DescriptionEach Node shape should have a Node value
RuleTargetShape
RuleFilterHASCATEGORY(“GraphNode”)
RuleTestAND(NOT(STRSAME(Prop.Node, “”)),
NOT(STRSAME(Prop.Node, “<node>”)))
ID4
NameUNoEdgeValue
CategoryData
DescriptionEach Edge shape should have an Edge value
RuleTargetShape
RuleFilterHASCATEGORY(“GraphEdge”)
RuleTestAND(NOT(STRSAME(Prop.Edge, “”)),
NOT(STRSAME(Prop.Edge, “<edge>”)))
ID5
NameUNoNameValue
CategoryData
DescriptionEach Node shape should have a Name value
RuleTargetShape
RuleFilterHASCATEGORY(“GraphNode”)
RuleTestAND(NOT(STRSAME(Prop.Name, “”)),
NOT(STRSAME(Prop.Name, “<name>”)))
ID6
NameUBadNodeConnect
CategoryConnectivity
DescriptionNode shapes must only be glued to Edge shapes
RuleTargetShape
RuleFilterHASCATEGORY(“GraphNode”)
RuleTestAGGCOUNT(FILTERSET(GLUEDSHAPES(1),
“NOT(HASCATEGORY(“”GraphEdge””))”))+
AGGCOUNT(FILTERSET(GLUEDSHAPES(2),
“NOT(HASCATEGORY(“”GraphEdge””))”)) = 0

Useful links:
Introduction to Validation Rules in Visio Premium 2010
The Diagram Validation API
Dissecting the Process Flowchart Validation Rules
Writing rules to validate diagrams in Visio 2010 – A worked example
Other articles in this series:
Using #Visio and #PowerBI with #GraphDatabase in #SQLServer
Using #Visio and #PowerBI with #GraphDatabase in #SQLServer – Part 2
Using #JSON text in #Visio shapes

Related

Filed Under: Graph Database, SQL Server, Validation, Visio, Visio 2016 Tagged With: Validation

About David Parker

David Parker has 25 years' experience of providing data visualization solutions to companies around the globe. He is a Microsoft MVP and Visio expert.

Reader Interactions

Trackbacks

  1. Using #Visio with SQL Server #Graph Databases – April Update | bVisual - for people interested in Microsoft Visio says:
    April 10, 2018 at 7:58 pm

    […] Creating #Visio #Validation Rules for #GraphDatabase template […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

  • LinkedIn
  • Twitter

Recent Posts

  • Fixing dimensions of 2D shapes
  • Merging Linked Data from Similar Tables
  • Smart Radio Buttons and Check Boxes in Visio
  • Using Button Face Ids in Visio
  • Grid Snapping Revisited

Categories

Tags

Accessibility Add-Ins Connectors Containers Data Export Data Graphics Data Import Data Visualizer Educational Excel GraphDatabase Hyperlinks Icon Sets JavaScript LayerManager Layers Legend Link Data to Shapes Lists MSIgnite MVP Office365 Org Chart PowerApps PowerBI PowerQuery Processes Setup and Deployment Shape Data Shape Design ShapeSheet ShapeSheet Functions SharePoint 2013 SQL Teams Validation VBA Video Visio Visio 2007 Visio for the Web Visio Online Visio Services Visio Viewer Webinar

Footer

bVisual Profile

The UK-based independent Visio consultancy with a worldwide reach. We have over 25 years experience of providing data visualization solutions to companies around the globe.

Learn more about bVisual

  • Amazon
  • E-mail
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Search this website

Recent posts

  • Fixing dimensions of 2D shapes
  • Merging Linked Data from Similar Tables
  • Smart Radio Buttons and Check Boxes in Visio
  • Using Button Face Ids in Visio
  • Grid Snapping Revisited

Copyright © 2025 · Executive Pro on Genesis Framework · WordPress · Log in