Learn tips and tricks for using the software more effectively. Join Visio MVP Scott Helmers as he demonstrates how to display text on a shape that is derived from data fields in the shape or properties of the page or document.
- [Instructor] If you want the text on a shape to display a data value, you can insert a text display field onto the shape. Let's look at a network diagram to see how that works. I'm going to select this router. Notice that the Shape Data window shows a variety of fields that are part of this shape, many of which contain data values. On the Insert tab, in the Text group, is a button called Field. With this dialogue open, I can click Shape Data in the Category section on the left, and all of the field names appear here.
You'll see the list corresponds directly to those that are in the Shape Data window on the right side of the screen. I'm going to scroll down and choose Network Name as the field I want, and click Okay. And then that's the text that now appears below the shape. You aren't limited to displaying the contents of Shape Data fields. Let's create a text shape to look at other possibilities. On the Home tab, I'm going to select the Rectangle Tool, and draw a box in which we will put text.
With that shape still selected, back to the Insert tab, click Field. Notice I can choose different categories. If I choose Date/Time, I can create a text box that displays the last time this diagram was edited, or the current date and time, or the last time the diagram was printed, as examples. Document Info allows me to specify things like the author name, or the manager of the author of this diagram. Any of the other data fields you see here are all fair game.
Page Information, the name of this page, the page number. Geometry, Object Info, some more esoteric sort of things in the lower half of the Categories dialogue are still available. You can even create Custom Formula to display virtually anything that you'd like on a shape. In this case, let's go back to Document Info, and choose the Subject. At the moment, that didn't display anything, but if we click File, and go to Properties, Advanced Properties, in the Subject field, we can type "network diagram," or anything else that we'd like, click Okay, go back to the diagram, and we now see that text displayed on our shape.
I mentioned you can insert a page number. There's a special note about page numbers that's important. If you place a shape containing the page number field onto a background page, Visio displays the correct page number on every foreground page that uses that background. You can see evidence of this if you apply one of the built-in title blocks. Let's do that to this network diagram. On the Design tab, choose Borders & Titles, and I'll just pick one at random. Let's go to whole page view, Ctrl + Shift + W, and we now see a somewhat colorful, but nevertheless, a header at the top of the page.
More particularly, let's zoom in on the lower right, and we see page number. Let's add another page, and another page, just by clicking the plus sign, and when we zoom in we see that each of those pages is numbered properly. If I look at the background page itself, it says "Page 0," but that's just the placeholder, that's the field that we inserted automatically, in this case, by adding the border and title. What if you'd like to see the contents of more than one data field on a single shape, or add a data field to a shape that already contains text? Both things are possible.
Let's switch to a swim lane diagram, where we have shapes containing text. If I select a shape like "Interview candidates," notice that there are data fields displayed in the Shape Data window. Let's say that I want to add the cost, and display that along with the name of the shape. To do that, select the shape, enter Text Edit mode, in this case I just pressed F2, click to the end, press the Enter key to start a new line, and now go to the Insert tab, Field, Shape Data, and let's display the cost of this step in the process.
Click Okay, and then click outside the shape. Notice that now, when I select the shape, and change the value of the cost, let's say it's $75 now, the field immediately updates and displays correctly. I could similarly edit the text of the shape simply by selecting the shape, pressing F2, and changing the part of the text that I want to change. Let's switch back to our network diagram now to insert multiple data fields onto a single shape.
We previously added the network name to this router shape. We can press F2 to enter Edit Mode, use the right arrow key or the cursor, add a new line, and simply insert a second data field, very much like we just did adding a data field to static text. In this case, we're adding a second data field. I'm going to add the IP address for this shape. Both fields are now represented on the diagram. Inserting text display fields is a great way to add value to a diagram, by making data visible.
You can display the contents of a single field, multiple data fields, or mix static text with data values. However, what you learned in this video is not the only way to view multiple data fields. To learn about a technique that can produce diagrams like the one on the screen, take a look at the videos about data graphics in my course titled "Advanced Visio: Working with Data" that is also on this site.
Lynda.com is a PMI Registered Education Provider. This course qualifies for professional development units (PDUs). To view the activity and PDU details for this course, click here.
The PMI Registered Education Provider logo is a registered mark of the Project Management Institute, Inc.
- Decoding Visio versions and editions
- Setting Visio options
- Navigating like a pro
- Taking advantage of hyperlinks
- Managing text on shapes
- Annotating diagrams with comments and callouts
- Inserting text display fields
- Working more efficiently
- Mastering Visio keyboard shortcuts
- Aligning and sizing shapes on a page
- Managing connectors and connection points
- Copying, pasting, and duplicating shapes