Discussion:
Formulas from Custom Properties not copying into Shapesheets correctly...
(too old to reply)
Harry
2007-05-15 17:45:14 UTC
Permalink
Hi all,
I have a custom property set in which I've created a field called "ShapeID". ShapeID is simply a concatenation of the contents of the "Shape Number" and "ShapeNumber Text" fields created by Visio when the "Number Shapes" Add-in is run. The concatenated info will be displayed on, and used as the sort field for, a report.

I've entered the formula Prop.ShapeNumberText&Prop.ShapeNumber in the Value field of the Define Custom Properties dialog box. I then copied the change to each shape in my diagram using the Apply custom property sets to selected shapes feature.

The problem I'm having is that Visio displays Prop.ShapeNumberText&Prop.ShapeNumber in the Define Custom Properties dialog yet in the shapesheet for each of the shapes the value field shows "Prop.ShapeNumberText&Prop.ShapeNumber" (Visio adds quotation marks which, as you've likely already guessed, converts the formula to a sting). So, when I run my report instead of the concatenated values of the two fields being displayed I see the phrase Prop.ShapeNumberText&Prop.ShapeNumber. The only way I've found to correct this is to manually go to each shape's shapesheet and remove the added quotes.

I suspect my problem has to do with the Value field from the Custom Properties dialog defaulting to a sting - is there any way to add a formula without having to enter each shape manually?

Thanks in advance for any light you can shed on my problem.

Harry
JuneTheSecond
2007-05-17 04:50:00 UTC
Permalink
I tested as you, making Prop.ShapeNumberText, Prop.ShapeNumber and
Prop.ShapeID., and then entering your formula,
Prop.ShapeNumberText&Prop.ShapeNumber, in the Value cell of Prop.ShapeID.
and opened the dialog of custom propert, then I found every thing is normal.
That is there displayed concatinated data of the values of both
Prop.ShapeNumberText and Prop.ShapeNumber.
Every thing is OK. I think your operetion seems correct with no problem.
--
JuneTheSecond
Post by Harry
Hi all,
I have a custom property set in which I've created a field called "ShapeID". ShapeID is simply a concatenation of the contents of the "Shape Number" and "ShapeNumber Text" fields created by Visio when the "Number Shapes" Add-in is run. The concatenated info will be displayed on, and used as the sort field for, a report.
I've entered the formula Prop.ShapeNumberText&Prop.ShapeNumber in the Value field of the Define Custom Properties dialog box. I then copied the change to each shape in my diagram using the Apply custom property sets to selected shapes feature.
The problem I'm having is that Visio displays Prop.ShapeNumberText&Prop.ShapeNumber in the Define Custom Properties dialog yet in the shapesheet for each of the shapes the value field shows "Prop.ShapeNumberText&Prop.ShapeNumber" (Visio adds quotation marks which, as you've likely already guessed, converts the formula to a sting). So, when I run my report instead of the concatenated values of the two fields being displayed I see the phrase Prop.ShapeNumberText&Prop.ShapeNumber. The only way I've found to correct this is to manually go to each shape's shapesheet and remove the added quotes.
I suspect my problem has to do with the Value field from the Custom Properties dialog defaulting to a sting - is there any way to add a formula without having to enter each shape manually?
Thanks in advance for any light you can shed on my problem.
Harry
JuneTheSecond
2007-05-17 06:01:01 UTC
Permalink
The 1st thing to do might be just making custom propery on the page.
Then please open the shapesheet of the page, add rows to the Custom Preperty
Section, (or Shape Data in Visio 2007). The number of rows are as same as the
number of layers. And then enter "Layers.Name" in the Vlaue cell of the first
row, "Layers.Name[2]", and so on.
--
JuneTheSecond
Post by JuneTheSecond
I tested as you, making Prop.ShapeNumberText, Prop.ShapeNumber and
Prop.ShapeID., and then entering your formula,
Prop.ShapeNumberText&Prop.ShapeNumber, in the Value cell of Prop.ShapeID.
and opened the dialog of custom propert, then I found every thing is normal.
That is there displayed concatinated data of the values of both
Prop.ShapeNumberText and Prop.ShapeNumber.
Every thing is OK. I think your operetion seems correct with no problem.
--
JuneTheSecond
Post by Harry
Hi all,
I have a custom property set in which I've created a field called "ShapeID". ShapeID is simply a concatenation of the contents of the "Shape Number" and "ShapeNumber Text" fields created by Visio when the "Number Shapes" Add-in is run. The concatenated info will be displayed on, and used as the sort field for, a report.
I've entered the formula Prop.ShapeNumberText&Prop.ShapeNumber in the Value field of the Define Custom Properties dialog box. I then copied the change to each shape in my diagram using the Apply custom property sets to selected shapes feature.
The problem I'm having is that Visio displays Prop.ShapeNumberText&Prop.ShapeNumber in the Define Custom Properties dialog yet in the shapesheet for each of the shapes the value field shows "Prop.ShapeNumberText&Prop.ShapeNumber" (Visio adds quotation marks which, as you've likely already guessed, converts the formula to a sting). So, when I run my report instead of the concatenated values of the two fields being displayed I see the phrase Prop.ShapeNumberText&Prop.ShapeNumber. The only way I've found to correct this is to manually go to each shape's shapesheet and remove the added quotes.
I suspect my problem has to do with the Value field from the Custom Properties dialog defaulting to a sting - is there any way to add a formula without having to enter each shape manually?
Thanks in advance for any light you can shed on my problem.
Harry
JuneTheSecond
2007-05-17 07:31:03 UTC
Permalink
I am sorry last one is miss located post.
--
JuneTheSecond
Harry
2007-05-18 17:44:38 UTC
Permalink
Sorry, I click "send' a bit too soon... The screen cap I attached to my
previous posts shows the report results of my problem; Visio's default
treatment of the formula I've added to my custom properties (rows 6-8 in the
ShapeID field) shows only my formula, including "=" sign. The formulas I've
"corrected" by manually removing the quotes from the value field of each
shape's shapesheet are shown in rows 1-5

Cheers,
Harry
Hi June,
Thanks for the response; unfortunately I'm still getting a report with my
formula converted to a string... Everything works fine as long as I go
into each shape's shapesheet to manually remove the quotation marks but
with literally thousands of shapes that's a bit impractical. I'll play
with this a bit more and see I have any success - if so, I'll post my
findings to the group.
Thanks again,
Harry
Post by JuneTheSecond
I tested as you, making Prop.ShapeNumberText, Prop.ShapeNumber and
Prop.ShapeID., and then entering your formula,
Prop.ShapeNumberText&Prop.ShapeNumber, in the Value cell of Prop.ShapeID.
and opened the dialog of custom propert, then I found every thing is normal.
That is there displayed concatinated data of the values of both
Prop.ShapeNumberText and Prop.ShapeNumber.
Every thing is OK. I think your operetion seems correct with no problem.
--
JuneTheSecond
Post by Harry
Hi all,
I have a custom property set in which I've created a field called
"ShapeID". ShapeID is simply a concatenation of the contents of the
"Shape Number" and "ShapeNumber Text" fields created by Visio when the
"Number Shapes" Add-in is run. The concatenated info will be displayed
on, and used as the sort field for, a report.
I've entered the formula Prop.ShapeNumberText&Prop.ShapeNumber in the
Value field of the Define Custom Properties dialog box. I then copied
the change to each shape in my diagram using the Apply custom property
sets to selected shapes feature.
The problem I'm having is that Visio displays
Prop.ShapeNumberText&Prop.ShapeNumber in the Define Custom Properties
dialog yet in the shapesheet for each of the shapes the value field
shows "Prop.ShapeNumberText&Prop.ShapeNumber" (Visio adds quotation
marks which, as you've likely already guessed, converts the formula to a
sting). So, when I run my report instead of the concatenated values of
the two fields being displayed I see the phrase
Prop.ShapeNumberText&Prop.ShapeNumber. The only way I've found to
correct this is to manually go to each shape's shapesheet and remove the
added quotes.
I suspect my problem has to do with the Value field from the Custom
Properties dialog defaulting to a sting - is there any way to add a
formula without having to enter each shape manually?
Thanks in advance for any light you can shed on my problem.
Harry
David Parker
2007-05-21 14:27:25 UTC
Permalink
The problem is that you entered the correct formula but in the wrong place.
You must use the ShapeSheet to enter the formula because the Define dialog
will always convert it into a string.
Post by Harry
Sorry, I click "send' a bit too soon... The screen cap I attached to my
previous posts shows the report results of my problem; Visio's default
treatment of the formula I've added to my custom properties (rows 6-8 in
the ShapeID field) shows only my formula, including "=" sign. The
formulas I've "corrected" by manually removing the quotes from the value
field of each shape's shapesheet are shown in rows 1-5
Cheers,
Harry
Hi June,
Thanks for the response; unfortunately I'm still getting a report with my
formula converted to a string... Everything works fine as long as I go
into each shape's shapesheet to manually remove the quotation marks but
with literally thousands of shapes that's a bit impractical. I'll play
with this a bit more and see I have any success - if so, I'll post my
findings to the group.
Thanks again,
Harry
Post by JuneTheSecond
I tested as you, making Prop.ShapeNumberText, Prop.ShapeNumber and
Prop.ShapeID., and then entering your formula,
Prop.ShapeNumberText&Prop.ShapeNumber, in the Value cell of
Prop.ShapeID.
and opened the dialog of custom propert, then I found every thing is normal.
That is there displayed concatinated data of the values of both
Prop.ShapeNumberText and Prop.ShapeNumber.
Every thing is OK. I think your operetion seems correct with no problem.
--
JuneTheSecond
Post by Harry
Hi all,
I have a custom property set in which I've created a field called
"ShapeID". ShapeID is simply a concatenation of the contents of the
"Shape Number" and "ShapeNumber Text" fields created by Visio when the
"Number Shapes" Add-in is run. The concatenated info will be displayed
on, and used as the sort field for, a report.
I've entered the formula Prop.ShapeNumberText&Prop.ShapeNumber in the
Value field of the Define Custom Properties dialog box. I then copied
the change to each shape in my diagram using the Apply custom property
sets to selected shapes feature.
The problem I'm having is that Visio displays
Prop.ShapeNumberText&Prop.ShapeNumber in the Define Custom Properties
dialog yet in the shapesheet for each of the shapes the value field
shows "Prop.ShapeNumberText&Prop.ShapeNumber" (Visio adds quotation
marks which, as you've likely already guessed, converts the formula to
a sting). So, when I run my report instead of the concatenated values
of the two fields being displayed I see the phrase
Prop.ShapeNumberText&Prop.ShapeNumber. The only way I've found to
correct this is to manually go to each shape's shapesheet and remove
the added quotes.
I suspect my problem has to do with the Value field from the Custom
Properties dialog defaulting to a sting - is there any way to add a
formula without having to enter each shape manually?
Thanks in advance for any light you can shed on my problem.
Harry
Loading...