Home » Developer & Programmer » Forms » forms 6i list item condition problem (forms 6i)
forms 6i list item condition problem [message #588124] Fri, 21 June 2013 02:33 Go to next message
sameer_da
Messages: 74
Registered: April 2013
Location: India
Member
Hellow,
I've 10 test filed, infornt of each text filed there are 10 list itme.
for each list item element list is given below
Route
Customer name
Delivery date
Delivery time
Delivery Session
Expected Received
Actual received
Fresh received
Rate per liter
Debit amount

On text fields i am fetching the records form another file . User will map the list item with text item.
what i want to check is list item should not get repeated.
Text item			list item
-------------------------------------------------
	A			Route
	B			Customer name
	C			Delivery date
	D			Delivery Time
	E			Delivery date
	F                       Expected received
	G                       Actual received
	H                       Fresh Received
	I              		Rate per liter
	K                       Debit amount


at position C - Delivery date is assign but at position E - Delivery date is assign again. I want to avoid this thing and prompt the user regarding the same.
How should i go about this.? Shuld i design a button for validation if yes then what should be the code? or shold i go with when-list-chane and what should be the code?

My design time view is like this
	
	Text                      list item
	------------------------------------
	txt1			list1
	txt2			list2
	txt3			list3
	txt4			list4
	txt5			list5
	txt6			list6
	txt7			list7
	txt8			list8
	txt9			list9
	txt10			ist10



please suggest something.
Thank you.
Sameer
Re: forms 6i list item condition problem [message #588139 is a reply to message #588124] Fri, 21 June 2013 05:49 Go to previous messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
Are the list items separate items in one block, or the same item repeated?
Re: forms 6i list item condition problem [message #588141 is a reply to message #588139] Fri, 21 June 2013 05:57 Go to previous messageGo to next message
sameer_da
Messages: 74
Registered: April 2013
Location: India
Member
I have separate list item on the block.
Re: forms 6i list item condition problem [message #588143 is a reply to message #588141] Fri, 21 June 2013 06:34 Go to previous messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
check them in when-validate-record
Re: forms 6i list item condition problem [message #588145 is a reply to message #588143] Fri, 21 June 2013 07:14 Go to previous messageGo to next message
sameer_da
Messages: 74
Registered: April 2013
Location: India
Member
Thanks for reply,

For each list item i suppose to write the code?

Re: forms 6i list item condition problem [message #588146 is a reply to message #588145] Fri, 21 June 2013 07:19 Go to previous messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
You could load them all into an array then use a select against that to check for duplicates.
Re: forms 6i list item condition problem [message #588325 is a reply to message #588146] Tue, 25 June 2013 00:05 Go to previous messageGo to next message
sameer_da
Messages: 74
Registered: April 2013
Location: India
Member
Hello I have written following code on the when-button-pressed
But at run time it show me the error 'duplicate column mapping occure..' but it does not come out and complets futher processing.
what should i do for that or is the any mistake in code?
please help me.


Declare
	tab_array dbms_sql.varchar2_table;
Begin
	
		tab_array(1):=:tab_col1;
		tab_array(2):=:tab_col2;
		if tab_array(2) = tab_array(1) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL3');
		end if;
		
		tab_array(3):=:tab_col3;
		if tab_array(3) in(tab_array(1),tab_array(2)) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL3');
		end if;

		tab_array(4):=:tab_col4;
		if tab_array(4) in(tab_array(1),tab_array(2),tab_array(3)) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL4');
		end if;
		
		tab_array(5):=:tab_col5;
		if tab_array(5) in(tab_array(1),tab_array(2),tab_array(3),tab_array(4)) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL5');
		end if;
		
		tab_array(6):=:tab_col6;
		if tab_array(6) in(tab_array(1),tab_array(2),tab_array(3),tab_array(4),tab_array(5)) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL6');
		end if;
		
		tab_array(7):=:tab_col7;
		if tab_array(7) in(tab_array(1),tab_array(2),tab_array(3),tab_array(4),tab_array(5),tab_array(6)) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL7');
		end if;
		
		tab_array(8):=:tab_col8;
		if tab_array(8) in(tab_array(1),tab_array(2),tab_array(3),tab_array(4),tab_array(5),tab_array(6),tab_array(7)) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL8');
		end if;
		
		tab_array(9):=:tab_col9;
		if tab_array(9) in(tab_array(1),tab_array(2),tab_array(3),tab_array(4),tab_array(5),tab_array(6),tab_array(7),tab_array(8)) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL9');
		end if;
		
		tab_array(10):=:tab_col10;
		if tab_array(10) in(tab_array(1),tab_array(2),tab_array(3),tab_array(4),tab_array(5),tab_array(6),tab_array(7),tab_array(8),tab_array(9)) then
			message('duplicate column mapping occure ...'); message('.');
			GO_ITEM('BLK_MAIN.TAB_COL10');
		end if;
		
	delete test;
	get_excel;
end;

Re: forms 6i list item condition problem [message #588339 is a reply to message #588325] Tue, 25 June 2013 03:49 Go to previous messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
to stop the trigger completing you need to use raise form_trigger_failure.
Re: forms 6i list item condition problem [message #588354 is a reply to message #588339] Tue, 25 June 2013 04:50 Go to previous message
sameer_da
Messages: 74
Registered: April 2013
Location: India
Member
Thank you cookiemonster.
Previous Topic: Creating Domain Failed while Configuring Oracle Forms Instance
Next Topic: Change the total based on the checkbox value
Goto Forum:
  


Current Time: Fri Aug 01 19:35:20 CDT 2014

Total time taken to generate the page: 0.10923 seconds