Search code examples
databaseformsvalidationoracle-apexinput-mask

How does the format mask work in Oracle APEX?


I have just been given an assignment for University on databases where I have to use Oracle APEX. For one of my columns in a report, I need to use a format mask. The format mask I need in the form of AAAA00, where A is any letter and 0 is any number.

Trying to get this to work is an issue though. I've heard the syntax for any number is 9 and I assume it's A for the letter, so wouldn't the format mask be AAAA99?

This is what I tried

I tried using it but didn't succeed. When using the form, you can still input anything. I even tried using one of the default date options for the format mask, and that didn't work either.

Any ideas on what to do?


Solution

  • Oracle APEX Format Mask is only for the Number and Date type objects, you can't format strings using it.

    Also, Format Masks are for display only, lets say I have a mask 9G9G9G9 in an Interactive Grid column, it would display numbers like : 3,1,4,1. I could go and edit my cell putting 1337, it won't change until I save my report, it will then format itself in my mask and display my number as 1,3,3,7.

    I believe you are trying to restrict your user from giving an input other than in your format, (an input mask), I believe this post could help you achieve what you are trying .