Apparently this is trickier than I expected. Any idea why this won't work?
let L(List)
let s(String)
let i (Integer)
L = List("40mm","50mm","75mm","100mm","150mm" )
s = "75mm"
i = L.IndexOf(s,0)
Message("Index of " + s + ": " + i)
Ultimately I'm trying to get to this (which doesn't work either):
/* P is an already existing parameter with multiple values. It has been populated with the following line: */
/* P.AuthorizedValues = List("40mm","50mm","75mm","100mm","150mm" ) */
let L (List)
let s (String)
let i (Integer)
L = P.AuthorizedValues /* Load all the values from P into the list L - This part is working ok as far as I can tell */
s = P /* Set s equal to the current value of P - This part works fine as well */
i = L.IndexOf(s,0) /* Find what position the current value of P (s) is in the list of possible values for P */
Message("Index of " + s + ": " + i) |