-1

I asked this question before but did get a favorable response so am asking again just to see if i get help.

I have an oracle form with a field (:p4_filenumber) and i am trying to either get a input or format mask which changes the numbers in the filed to the format x/xx/xxx. The input mask will of course allow the numbers to be entered in with the above format before process but if i cant get that then i could use the format mask to change it after process.

rawle
  • 91
  • 2
  • 9
  • Hello! If your previous question was as terse and vague as this one, the reason why you don't get an answer is that you didn't provide enough information for people to help you. http://idownvotedbecau.se/itsnotworking/. If you have not done that yet, remember that we have a site containing tips on [how to ask a good question](https://stackoverflow.com/help/how-to-ask) – akraf Jan 02 '19 at 14:14
  • 1
    i have edited the question – rawle Jan 02 '19 at 14:29
  • 1
    Possible duplicate: https://stackoverflow.com/questions/1041415/how-can-i-format-a-number-as-xxx-xx-xxxx . As you have not provided any hints on what you have tried or what similar tips you have found, I don't know if you have found this and it didn't work for whatever reason. – akraf Jan 02 '19 at 14:39
  • Possible duplicate of [Applying a phone number format mask in oracle apex](https://stackoverflow.com/questions/51770342/applying-a-phone-number-format-mask-in-oracle-apex) – Jeffrey Kemp Jan 21 '19 at 02:38

1 Answers1

0

You can't do this with a format mask because x/xx/xxx is not a representation for a number. It's sort of a date, but not quite. You don't say how this field will be stored in the database, but I'm guessing it will be a VARCHAR2. If you're just trying to reformat, say, user input of xxxxxx into x/xx/xxx, then you need a Dynamic Action for that, probably on the change of the field. That would run a piece of Javascript to reformat the input.

But there's a lot there to unpack. What if the user enters only 4 numbers? What if they enter letters?

eaolson
  • 14,717
  • 7
  • 43
  • 58