Home » Developer & Programmer » Forms » Auto number & Duplicate record restriction (Forms 6i , Win XP)
Auto number & Duplicate record restriction [message #301133] Tue, 19 February 2008 04:49 Go to next message
adilsami
Messages: 46
Registered: October 2007
Member
Hi there,

1) i want to apply an auto number on a certain field,
along with that the field get's disable for insertion
as its already got assigned a value .

2) i want to put a check on on field for the duplicate value,
& it shows me a message " record already exist " , n doesn't allow me to
move to the next field , as i don't want to left the previous field empty .

can anyone help me with this , as am new to forms !

regards,
Adil.
Re: Auto number & Duplicate record restriction [message #301134 is a reply to message #301133] Tue, 19 February 2008 04:55 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
What is your machinsim of create uniquie no.? Are you using a sequence. I am sure you are not using a sequence b/c if you were using SEQUENCE then you will not have a duplicate number.

Regards,
Azam Khan
Re: Auto number & Duplicate record restriction [message #301137 is a reply to message #301133] Tue, 19 February 2008 05:14 Go to previous messageGo to next message
adilsami
Messages: 46
Registered: October 2007
Member
ive used the 'EMP' n 'DEPT' tables
relationship based on 'deptno'

the auto number generate is on 'deptno'
and the duplicate record check is on 'empno'

Re: Auto number & Duplicate record restriction [message #301138 is a reply to message #301137] Tue, 19 February 2008 05:21 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
please check the EMPNO column values.
Re: Auto number & Duplicate record restriction [message #301144 is a reply to message #301133] Tue, 19 February 2008 05:41 Go to previous messageGo to next message
adilsami
Messages: 46
Registered: October 2007
Member
/forum/fa/3924/0/
Re: Auto number & Duplicate record restriction [message #301280 is a reply to message #301144] Tue, 19 February 2008 23:33 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why display them at all? Just have then in the block and when you add a new department use a sequence which has 'Start with' set to '40' and increment by '10'.

Same for 'empno', hide it, or make it display only, have another sequence, set 'Start with' to whatever is there already plus '1' and make the increment '1'.

To populate 'Mgr' and 'Dept' in the employee database consider using an LOV that shows the name of the manager or department and then populate the field using the hidden 'number'.

David
Previous Topic: Webutil problem
Next Topic: Querying Forms
Goto Forum:
  


Current Time: Fri Sep 27 10:31:37 CDT 2024