Re: What is the formula to change line properties from custom prop
- From: "John" <John74211@xxxxxxxxxxxxxxxx>
- Date: Wed, 13 Jun 2007 18:31:56 +0100
Hi there,
yes I'm 2007 as well. My guess is you've just got the format wrong
somewhere although it's difficult to know with seeing the shape***.
Take a look at this blog
(http://www.visguy.com/2006/11/22/consumer-reports-rating-shape/) from Chris
Roth in which he talks about the Lookup function. He's got a file download
at the end of the post so you can see what's happening.
Let us know how you get on.
Best regards
John
"Anderson" <Anderson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D70DEEAE-780B-4758-A792-0FCC0C941661@xxxxxxxxxxxxxxxx
I am using Visio 2007 (12.0.4518.1014) MSO (12.6017.5000)
It appears to be the lookup command.
I tried the example command for lookup
Example 1
LOOKUP("rat","cat;rat;;goat")
Returns 1.
The lookup command returned a 1 as in the example. However, it continues
to
return a -1 no matter what I use as values in the properties values.
I changed the values of
prop.message_exch_meth_options to be "cat;rat;;goat"
and prop.message_exch_method to be "rat"
still get -1
"John" wrote:
Your formulas work for me. Are you sure there's no space after the PJS
value in the Prop.Message_Exchange_Method cell?
Best regards
John
"Anderson" <Anderson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:19467BD0-36A2-4D85-8F36-7838AC34F37D@xxxxxxxxxxxxxxxx
User.MsgExchMeth is still evaluating to -1.
User.MsgExchMeth=LOOKUP(Prop.Message_Exchange_Method,Prop.Message_Exch_Method_Options,";")
Prop.Message_Exch_Method_Options="A2A; BizTalk; Cron Job; PJS; Pt2Pt;
SQL;
Manual; Export/Import"
Prop.Message_Exchange_Method="PJS"
Format
=FIELDPICTURE(0)=(Prop.DataType2)&CHAR(10)&(User.MsgExchMeth)
It displays
PartNumber
-1
It doesn't matter what value (ie.. A2A, Biztalk,...) I set
Prop.Message_Exchange_Method, I it still only evaluates to a -1.
I tried various permutations of what you sent and did not get anything
to
change the value.
"David Parker" wrote:
Format is a particilar cell in a row in the Custom Properties/Shape
Data
section
I think John assumed that you had entered Type =1 and had the value
"Manual;
Automatic; Unknown" in a Row named Message_Exchange_Method
(The Prop. gets added automatically)
Then User.MsgExchMeth =
LOOKUP(Prop.Message_Exchange_Method,Prop.Message_Exchange_Method.Format)
would work whenever you selected a value in
Prop.Message_Exchange_Method
You could have the following in LinePattern
=GUARD(INDEX(User.MsgExchMeth
,"1;2;3"))
Alternatively, you could have another user cell with the formula:
=SETF(GETREF(LinePattern),"=GUARD(" & INDEX(User.MsgExchMeth ,"1;2;3")
&
")")
--
David Parker
Microsoft MVP (Visio)
http://bvisual.spaces.live.com
http://www.visualizinginformation.com
"Anderson" <Anderson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:27D81C4F-6606-43F5-BE44-74E22F5AAF81@xxxxxxxxxxxxxxxx
Thank you for responding.
I am working with the shape*** for the object. When I tried to
enter
the
name "Prop.Message_Exchange_Method.Format" as a Shape Data
property I
recieved an error. The error implied a decimal was not allowed in
the
property name. I changed the name to
"Prop.Message_Exchange_Method_Format"
and updated the Lookup formula.
However, the value returned for User.MsgExchMeth does not change.
It
returns a -1.
any thoughts on what I did incorrectly?
"John" wrote:
Hi Anderson,
Have a go with the following (which uses an extra User cell):
Prop.Message_Exchange_Method.Format cell = "Manual; Automatic;
Unknown"
User.MsgExchMeth cell
=LOOKUP(Prop.Message_Exchange_Method,Prop.Message_Exchange_Method.Format)
Line format cell =IF(User.MsgExchMeth=0,23,1)
The Lookup function returns the index of of the selected item (zero
based),
so Manual=0, Automatic=1 and Unknown=2.
Let me know how you get on.
Best regards
John
"Anderson" <Anderson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1385A085-4E4D-4690-B51D-B4AF824448F8@xxxxxxxxxxxxxxxx
am using the Visio 2007 Pro edition:
I would like to change the Line Pattern for an object based on
the
contents
of a custom properties cell.
I created a custom Shape Data property call
"Message_Exchange_Method".
It
has three values (Manual, Automatic, Unknown) and I want to
change
the
line
pattern based on the value.
The closest function I could find was the "IF" function even
though
it
doesn't really have an ifelse type option.
When I tried using the "IF" statement, it would always evaluate
to
"true".
IF((Prop.Message_Exchange_Method)="Manual",23,1)
I saw the thread in this group named: IF()Functions and strings
and
then
tried the following:
STRSAME(Prop.Message_Exchange_Method,"Manual",23). But this did
not
evaluate as expected and limits the values that may be listed in
the
cell
contents for Message_Exchange_Method.
I have successfully used functions to get cell contents with
"Text
Field"
(
Prop.ICD_No)&CHAR(10)&(Prop.DataType1)&CHAR(10)&(Prop.DataType2)
)
Do you have any suggestions for how I can make the line pattern
change
based
on contents of another cell?
.
- References:
- Re: What is the formula to change line properties from custom property
- From: John
- Re: What is the formula to change line properties from custom prop
- From: Anderson
- Re: What is the formula to change line properties from custom prop
- From: David Parker
- Re: What is the formula to change line properties from custom prop
- From: Anderson
- Re: What is the formula to change line properties from custom prop
- From: John
- Re: What is the formula to change line properties from custom prop
- From: Anderson
- Re: What is the formula to change line properties from custom property
- Prev by Date: Re: What is the formula to change line properties from custom prop
- Next by Date: Re: Removing Autonumbers
- Previous by thread: Re: What is the formula to change line properties from custom prop
- Next by thread: Re: What is the formula to change line properties from custom property
- Index(es):