January 1, 20206 yr hi! I couldn't find a better area for this topic. But I have a variable $RowList which is defined to contain numerical values in List(FieldA; FieldB; FieldC; FieldD,..., FieldK). That is inside a Loop ($i as a counter). I would like to do some testing for each of them in turn (like: If (GetValue($RowList; $i) > x) then set $RowList value $i to something else). And then return the modified whole list back to a variable. Is that possible?
January 1, 20206 yr To replace a value at index position in listOfValues, you can use: LeftValues ( listOfValues ; index - 1 ) & replacementValue & ¶ & RightValues ( listOfValues ; ValueCount ( listOfValues ) - index ) Note that the result will have a trailing ¶.
January 1, 20206 yr 49 minutes ago, bcooney said: A good custom function to add to your file. https://www.briandunning.com/cf/2169 That function performs a task that is fundamentally different from the one required here (at least the way I understood it).
January 3, 20206 yr Author Thank you comment and bcooney! The way, comment showed, is what I need. But this custom function is also very useful for me.👍
January 3, 20206 yr Note also that if you're looping over a list of values, you can add each processed value to a new list in another variable, say: Set Variable [ $result ; List ( $result; If ( GetValue ( $RowList ; $i ) > $x ; "a" ; "b" ) ) ] Edited January 3, 20206 yr by comment
Create an account or sign in to comment