Often when a project is imported from your SPSS file, you will notice that questions have a format that looks like:


If it is more readable if the number are in the front instead of the back, you can either edit the format for any question, or use the console with the following code to change the number to the front, e.g. 'Most Valuable 7' to '7 Most Valuable':


protobi.getDimensions().forEach(function(dim) { var fmt = dim.get('format'); if (fmt) { for (var key in fmt) { var d =fmt[key].slice(-1); if (d==+d) { console.log(fmt[key]); fmt[key] = d + ' ' + fmt[key].slice(0,-1)}} }})


Like below:


This is an example of how we can use JavaScript to efficiently modify your Protobi project