Document Number Calculated Mask

Hello,

Is it possible to incorporate WHERE/OR/ESLE statements into the calculated mask?

Thanks,

Catherine