News:

Happy New Year!

Main Menu

Using shapesheet formulas

Started by cjjongerius, January 13, 2013, 01:38:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cjjongerius

I have a question about using formulas in the shapesheet window.

My goals is to change to the text color of an object if it has a hyperlink and give it another text color when the hyperlink is removed.
I am searching for a formula that can check/count whether the section "Hyperlinks" has any rows or not.
I do not want to use any VBA, only if there is no other way possible

So far I have tried the following formula in the section "Character" and column "Color":
=IF(Hyperlink.Row_1.SubAddress="",2,0)

This works fine when you insert a hyperlink for the very first time; the text turns black and when you remove the hyperlink, the text turns red.

However, when you insert a new hyperlink afterwards, the formula does anymore because either:
- The formua has changed to: =IF(ref()="",2,0)
- The name of the row in the hyperlinks sectio has changed to Hyperlink.Row_<any random number>

Could you please help me out?

Yacine

Chris posted some time ago a formula to count the geometry sections in a shape. I think it can be adapted to your problem
http://www.visguy.com/2006/10/04/counting-geometry-sections/
Yacine

cjjongerius

I have read this topic you refer to. But I am new to Visio formula's.

As far as I understand, the formula's still point to a spefic row in Hyperlinks, which will be removed.

Is there no formula that can count the row of any section? Or that a formula can point to the first row (independed of the row name) using Indexing?

vojo

that post is checking the section in geometry...not hyperlinks

Alternatively, you could do something similar for first cell in each geomeotry......geometry<n>.x1

I tend to think doing this in visio shapesheet (some type of dynamic interrogation of the shape via formulas) is probably going
to lead to a dead end.    Visio shapes are NOT self aware....so you cant do any sort of dynamic discovery via shapesheet
(nothing like....on drop, find shape X....or....on trigger, figure out what shapes are attached to me).

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 191 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1057KB.
Tokens: post-login.
Cache hits: 13: 0.00142s for 26,597 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]