Can you help me understand why my use of the ‘caseIndex’ attribute is not working in this simulation?
https://codap.concord.org/app/#shared=98506
The issue is that this command in the Samples table:
if(first(caseIndex,value=”A”)4,
first(caseIndex,value=”A”),”4+”)
always returns “4+”, as if the conditional argument is false.
My workaround was to define an attribute called ‘myindex’ in the Items table whose formula is simply ‘caseIndex’. With that change, the following command works as intended in the Samples table:
if(first(myindex,value=”A”)<4,
first(myindex,value=”A”),”4+”)
Am I doing something wrong? Seems like this might be a bug…
(Related: I noticed whenever I clear the data to run the simulation again, the ‘myindex’ attribute is deleted from the Items table and I have to recreate it. Is that intended behavior?)