Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
...
Figure 6: Example input 2 in the Script property.
Code Block | ||||
---|---|---|---|---|
| ||||
int decimalNumber = index+1; int[] values = {1000,900,500,400,100,90,50,40,10,9,5,4,1}; String[] romanLetters = {"M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"}; StringBuilder romanNumber = new StringBuilder(); for(int i=0; i<values.length; i++){ while(decimalNumber >= values[i]){ decimalNumber = decimalNumber - values[i]; romanNumber.append(romanLetters[i]); } } return romanNumber; |
...
Figure 8: Example input 3 in the Script property.
Code Block | ||||
---|---|---|---|---|
| ||||
int rowNumber = index + 1; int determinant = rowNumber % 2; if (determinant == 0){ return "Even " + rowNumber; } else if (determinant != 0){ return "Odd " + rowNumber; } else{ return "Error"; } |
...