1 Reply Latest reply: Feb 8, 2018 5:05 AM by Jose Miguel Vilaplana RSS

    SetNumValue with decimals

    Jose Miguel Vilaplana

      Hi All,


      I´m trying to assign a not integer number (decimal) to a variable in a Qlik Sense extension.


      The format of the value is in "spanish format", using "," to separate the decimals. The value is "0,945323".


      I tried with SetNumValue and SetStringValue but it doesn´t works.


      Anyone knows how to use this function?



        • Re: SetNumValue with decimals
          Jose Miguel Vilaplana

          I solved, but I´m not proud about the solution, I think it will be another one better than this.


          I used the replace function to change the "," by "." and put the value inside =() like a formula or variable and with this is working. But this only will work with "spanish format"


          this is the line:

          • qlik.currApp().variable.setStringValue($scope.layout.props.varName, '=(' + $scope.layout.props.varValue.replace(",", ".") + ')');