Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jmvilaplanap
Specialist
Specialist

SetNumValue with decimals

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?

Thanks

1 Solution

Accepted Solutions
jmvilaplanap
Specialist
Specialist
Author

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(",", ".") + ')');

View solution in original post

1 Reply
jmvilaplanap
Specialist
Specialist
Author

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(",", ".") + ')');