setCurrentPageItem need short data type NODE.JS

Hello. the method setCurrentPageItem of the PivotField class requires a short data type.
in the javascript documentation says how to convert to data type short. using Int16Array. But in this case it doesn’t work. there is an error that integer is not match. What can be done?

@EvilPixi,

Please refer to the stackoverflow thread on how to convert integer to short for your reference. If you still find any issue, kindly do share your sample code, we will check it soon.

@EvilPixi,

Please try using newShort API/attribute for your needs.