Select From List Problems
-
Hi All -
I'm adding various attributes to my dynamic components and am having trouble getting the "Select From List" to work properly. When I select certain options (but not all options), then hit apply, the selection automatically reverts to a different selection. For example, when I select "Electrical - Other" (see below for list of options and values), and then hits apply, the selection automatically changes to "Civil - Asphalt".
The algorithm that references these values them becomes incorrect. Does anyone know what is going on and/or have suggestions on how to rectify?
Below is my particular list of options and corresponding values:
Electrical - VFD / 15
Electrical - Other / 20
Electrical - Controls / 25
Electrical - Motor / 30Mechanical - Other (15) / 15
Mechanical - Other (20) / 20
Mechanical - Other (25) / 25
Mechanical - Pumps / 30
Mechanical - Valves / 30Civil - Asphalt / 20
Civil - Steel (Corrosive) / 30
Civil - Other (Corrosive) / 35
Civil - Concrete (Corrosive) / 50
Civil - Pressurized Pipes (Corrosive) / 50
Civil - Steel / 60
Civil - Pressurized Pipes / 60
Civil - Other / 75
Civil - Stainless Steel / 100
Civil - Concrete / 100 -
I mis-spoke in my original posting. After playing around for a while, I found that the "option" that I chose and the option that was automatically reverted to had the same values. It turns out that each option must have a unique value - otherwise the option chosen by the user may not show up correctly. Other than changing each value to a unique number (which I have done for the meanwhile) does anyone know how to have the same value for multiple options?
-
In the "select from list" function, the "value" is something between value and index. This value must be unique but can be anything, number, text or function.
I think about two ways to correct your problem :- Dirty but easy way: Play with the INT function
In your list, just use a decimal value to make each value unique and when you use the value just ad INT(value). The "Electrical - Other" value can be 20.1 and "Civil - Asphalt" can be 20.3 so they're unique, but is you ask the INT of them they return 20 as you want. Of course, that works if you only need integer values... - Cleaner but indirect way: Use a CHOOSE and OPTIONINDEX
In the list, use a unique value for each to avoid the error, but this value doesn't mind. To have a value, use the OPTIONINDEX function to return the position in the list and use the CHOOSE function to give the value you need.
In this case, the function must be something like that :
%(#000000)[= CHOOSE ( OPTIONINDEX ("list"), 15, 20, 25, 30, 15, 20....)]
This is a little harder to modify, because if you want to ad an item in the list or re-order the list, you must change carefully the CHOOSE function.
- Dirty but easy way: Play with the INT function
Advertisement