You will have to use the formatValue, which is the same functionality but you have to call it in a different way. I had the same problem with the currency viewer widget, and used this function as documented at https://apidocs.mendix.com/5/client/mx.parser.html. It will look something like:
mx.parser.formatValue(3000, "currency", { places: 2, groups: true });