I'm looking to implement a shape with 2 properties (Item and Cost) that asks the user 'Select a widget', with a drop-down list. Their selection goes into the 'Item' property. Based on the value of the item selected, the Cost property should be filled out with a value. I've tried putting in a formula in the shapesheet for the 'Cost' row's value to look at the selected option (for testing, i've called this selection property 'OneOrTwo' with the first option as 'One' and the second as 'Two'). I'm having trouble comparing the value successfully; i've tried:
=IF(Prop.OneOrTwo="Two","this is Two","this is not Two")
and;
=IF(Prop.OneOrTwo=INDEX(1,Prop.OneOrTwo),"this is Two","this is not Two")
However this always returns "this is Two", even if i selected 'One' or left it blank.
Any help would be greatly appreciated, thank you!
In Visio's ShapeSheet comparing two strings in performed by the function StrSame. Instead of writing: IF(t1 = t2, .., ..) you would write: IF(StrSame(t1,t2), .., ..)
Update
if(strsame(prop.oneortwo,"two"),"this is two","this is not two")
a case test could look something like:
user.input_list = "1;2;3;5"
user.output_list = "one;two;three;five"
user.result = INDEX(LOOKUP(prop.input,user.input_list),user.output_list)