View Single Post
  #1  
Old 18th August 2017, 09:48
kingsley143's Avatar
kingsley143 kingsley143 is offline
Member
 
Join Date: Feb 2008
Location: INDIA
Posts: 34
kingsley143 is on a distinguished road
Baan: Baan LN 6.1 - DB: Microsoft SQL server 2000 - OS: windows server 2003
Question How to use array form field to display multiple data
Baan: ERP LN 6.1
C/S: None/Unknown

Hi,

I am developing a maintain session on which project no will be input and based on that i want to fetch all the invoice no.s present against project no. and against every invoice user can enter bill no.

After giving project as input, only last invoice is getting displayed on the form. I want to display all the invoices.In this case 3 invoices are present against one project. I want to display all the 3 invoices and date on the form.

Do I have to use form field as array and how to use? Or is there any other way.
Please suggest.

screenshot of my form is attached.
Here, invn, bdte, sern are my display fields on the form.
Below is my code:
Code:
field.cprj:
after.zoom:
	serial.num = 0
	get.details()
	get.contract()
	get.invoice.number()
	sern = serial.num + 1
	display("sern")
	refresh()

function void get.invoice.number()
{
	select	cisli310.*
	from	        cisli310
	where	cisli310.cprj = {:cprj}
	selectdo
		invn = cisli310.tran&(str$(cisli310.idoc))
		display("invn")
		select	cisli305.*
		from	        cisli305
		where	cisli305._index1 ={:cisli310.sfcp,:cisli310.tran,:cisli310.idoc}
		selectdo
			if cisli305.stat = tcsli.stat.posted then
				flag = true
			endif
			bdte = cisli305.idat
 			display("bdte")
		selectempty
			bdte = 0
		endselect	
	selectempty
	endselect	
	
}
Thanks in advance.
Attached Images
File Type: png Invoice_no.PNG (21.0 KB, 11 views)
Reply With Quote