如何将 'Fixed List' 下拉列表中的选择与另一个 属性 中的选择进行比较?

How can I compare the selection in a 'Fixed List' dropdown to another property?

我想实现一个具有 2 个属性(项目和成本)的形状,它询问用户 'Select a widget',带有一个下拉列表。他们的选择进入 'Item' 属性。根据所选项目的价值,成本 属性 应填写一个值。我尝试在形状表中为 'Cost' 行的值输入一个公式以查看所选选项(为了测试,我将此选择称为 属性 'OneOrTwo' 第一个选项作为 'One',第二个作为 'Two')。我无法成功比较价值;我试过:

=IF(Prop.OneOrTwo="Two","this is Two","this is not Two")

和;

=IF(Prop.OneOrTwo=INDEX(1,Prop.OneOrTwo),"this is Two","this is not Two")

但是这总是 returns "this is Two",即使我选择了 'One' 或将其留空。

任何帮助将不胜感激,谢谢!

在 Visio 的 ShapeSheet 中比较两个字符串是由函数 StrSame 执行的。 而不是写: 如果 (t1 = t2, .., ..) 你会写: IF(StrSame(t1,t2), .., ..)

更新

if(strsame(prop.oneortwo,"two"),"this is two","this is not two")

案例测试可能类似于:

user.input_list = "1;2;3;5"

user.output_list = "one;two;three;five"

user.result = INDEX(查找(prop.input,user.input_list),user.output_list)