1 Reply Latest reply: Dec 5, 2011 6:28 PM by Miguel Angel Baeyens de Arce RSS

    Formula stopped working when going from QV10 to 11

    Michael Ellerbeck

      This is more of just a curiosity but


      I used to use


      SubStringCount(GetFieldSelections([Column Name], ',' ,Count(Distinct [Column Name])), 'Item')


      I think that the Count(Distinct [Column Name]) is returning a different value (type?) than it used to.


      Although if I create a variable with


      =Count(Distinct [Column Name]) and then reference it like this


      SubStringCount(GetFieldSelections([Column Name], ',' ,$myvariable), 'Item')


      then it works, strange


      Any thoughts?



        • Re: Formula stopped working when going from QV10 to 11
          Miguel Angel Baeyens de Arce

          Hi Michael,


          It seems it only accepts numeric values, and although Count() will return a numeric value it's not itself a number. That will work as expected as well with the dollar expansion


          SubStringCount(GetFieldSelections([Column Name], ',', $(=Count(Distinct [Column Name]))), 'Item')


          That happened in version 10 SR3 update 9061 with the Min() function, when the thrid parameter must be a numeric value instead of an expression returning a numeric value. I use the dollar expansion/macro expansion $(=) there as well.


          Hope that makes some sense.