BI Publisher conditional field masking
I have the following code on a field in a Peoplesoft BI Publisher RTF template where it is masking the first 4 digits of the Bank Account number.
The problem is that sometimes the total Bank Account number length is less than 4 digits and when this happens it causes an negative array error on the lpad function to occur.
Can I wrap some kind of conditional IF statement around this where it will check the length of the bank account number and if it is longer than 5 digits than mask the first 4 digits, else (for Bank Account numbers less than 5 digits) just mask the first 2 digits. What would this look like?