AnsweredAssumed Answered

Which part of my mind have I lost?

Question asked by AndyFrazier on Feb 9, 2017
Latest reply on Feb 9, 2017 by philmodjunk

So I'm setting up a CF. Here it is:

 

Chooser(fromList;toList;resultList;testValue):

 

Let([

     fCount=ValueCount(fromList);

     tCount=ValueCount(toList);

     rCount=ValueCount(resultList);

 

     fVal=GetValue(fromList;1);

     tVal=GetValue(toList;1);

     rVal=GetValue(resultList;1)];

 

     Case(

          rCount=0;0;

          Sum(fCount;tCount;rCount)/3≠rCount;"Check the tier setup.";

          (testValue>=fVal) and (testValue<tVal);rVal;

          Chooser(RightValues(fromList;fCount-1);RightValues(toList;tCount-1);RightValues(resultList;rCount-1);testValue)

     )

)

 

Always returns 0. If I echo out any of those "count" variables before the case statement, they come out right. But inside the case statement they all evaluate as 0. Since when was scoping a thing in FM???

 

Or am I missing something stupid?

Outcomes