set item in form

how can i set value to this after insert
set item emp to be in this format after i insert which trigger must i use
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
Isn't this the same as your previous question:

I remember other questions that were very similar about screen masking versus inserting the data.
chalie001Author Commented:
no is not the same i just what to display value in this form in oracle form 6210-14-242-8258
slightwv (䄆 Netminder) Commented:
If you want to physically update the data to add the dashes in the table on insert, then the form should just be able to display what it receives without any format masking.

If this is what you want to do, you should be able to apply the formatting inside the form and insert the data in the desired format.  I remember you asked a question on how to do that.  I just cannot find it.

I've not used forms for many years but are you wanting forms triggers or database level triggers?

If database level triggers:
If you cannot get forms to insert the data correctly, as a last resort you should be able to create a before insert trigger.  You might need an after insert trigger if forms interferes with the before trigger.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

awking00Information Technology SpecialistCommented:
Can you show some sample values that get inserted and how you would like them to be after an update?
chalie001Author Commented:
slightwv (䄆 Netminder) Commented:
Between this question and your other one, I'm not sure what you are trying to do and where you are trying to do it so I'll post this in both questions and hope it helps.

If you want to turn a set of numbers and apply a mask to add dashes at specific places, a regexp_replace will do that.

Here is an example:
with mydata as (
	select '8745155258732' mycol from dual
	union all
	select '9874166787831' mycol from dual
	union all
	select '3748177602234' mycol from dual
select regexp_replace(mycol,'([0-9]{4})([0-9]{2})([0-9]{3})([0-9]{4})','\1-\2-\3-\4')
from mydata;

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chalie001Author Commented:
select regexp_replace(mycol,'([0-9]{4})([0-9]{2})([0-9]{3})([0-9]{4})','\1-\2-\3-\4')
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.