Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 30th May 2005, 13:13
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
Display array field on form

Hello all,

I have an array field which I need to display on a form in a display session. The field is an address field filled with up to 6 elements, formatted using the tccom.dll4030.format.address() function.

I tried displaying using function display("address"), which gives me only the first element of the array. How do I get all elements displayed?

Thanks in advance,

En.
Reply With Quote
  #2  
Old 30th May 2005, 14:15
beginer's Avatar
beginer beginer is offline
Member
 
Join Date: Apr 2005
Posts: 66
beginer is on a distinguished road
Baan: BaaN 4c4 , BaaN 5 , BaaN Ln - DB: Informix , SQL - OS: Unix , Windows NT
storing in seperate variables & displaying

Hi ,

At my place we are assigning the array elements into seperate variables like add1 , add2 , add3 .... & then using the display() function for every variable dispay on form.

regards,
Reply With Quote
  #3  
Old 30th May 2005, 14:26
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
Hello beginner,

Of course that is a workaround, but I assume that this must be possible with an array field also...??
Reply With Quote
  #4  
Old 30th May 2005, 14:48
lakoon's Avatar
lakoon lakoon is offline
Senior Member
 
Join Date: Jul 2003
Location: Switzerland
Posts: 179
lakoon is on a distinguished road
Baan: Triton 2.0, Baan IV b/c /ERP /ERP LN - DB: Oracle / tbase / MSSQL - OS: Solaris / HP /Windows
Hello

Quote:
..but I assume that this must be possible with an array field also...??
Just had to solve this also with the work around, but I would be happy to know the way with the arrays as well

/lakoon
Reply With Quote
Sponsored Links
  #5  
Old 30th May 2005, 15:22
lakoon's Avatar
lakoon lakoon is offline
Senior Member
 
Join Date: Jul 2003
Location: Switzerland
Posts: 179
lakoon is on a distinguished road
Baan: Triton 2.0, Baan IV b/c /ERP /ERP LN - DB: Oracle / tbase / MSSQL - OS: Solaris / HP /Windows
I think like...

Hello

I just tried

Code:
domain tcmcs.str80 progress(8)
long i
	for i = 1 to 8
		attr.element = i
			display("progress")
	endfor
.. and it works so far.

/lakoon
Reply With Quote
  #6  
Old 30th May 2005, 15:29
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
Perfect Lakoon! This works.
Thanks for your input!

En
Reply With Quote
  #7  
Old 31st May 2005, 20:54
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Alternatively -

display.all() Displays all fields of all occurrences.

display.fld()
Displays a specified field of a specified occurrence. To display a field for all occurrences, use the following construction:

for i= 1 to filled.occ
display.fld( i, field )
endfor
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #8  
Old 1st June 2005, 10:30
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
NP, are you not mixing up array elements with multi occurence display...??
Reply With Quote
  #9  
Old 1st June 2005, 19:34
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
En,

I have used display.all() on process sessions. The other function display.fld() is for the multi-occ sessions.

I was suggesting alternative solution to Lakoon's idea.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #10  
Old 19th March 2008, 07:26
Ankita Ankita is offline
Member
 
Join Date: Dec 2007
Posts: 43
Ankita is on a distinguished road
Baan: IV c4 - DB: Informix - OS: Sun Solaris
Displaying Array Field in a display session!

Hi,

I have to display array field in a display session. The field is not in the table. The code written in above post for progress field doesnt work in my case. I am firing query for fetching all the bills for each item from the table (bills) other than the main table (items) in after.read event of main.table.io section of the script. My session is on the master table i.e. Items. I have to display all the bills for each item.

Please, can anyone suggest me how to display all the bills for each item in this situation. Or somebody has any other solution?

Thanks.
Reply With Quote
  #11  
Old 19th March 2008, 09:00
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
Hello Ankita,

I think if you post your code, it will be easier to understand and analyse your problem, abnd thus try to help you with a solution...


Regards,
Eli Nager
__________________
Member of Baan Board

Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #12  
Old 19th March 2008, 09:30
Ankita Ankita is offline
Member
 
Join Date: Dec 2007
Posts: 43
Ankita is on a distinguished road
Baan: IV c4 - DB: Informix - OS: Sun Solaris
Code!

Thank you Eli for the reply.

Following is the code,

declaration:

extern domain tcyesno process.status
extern domain tcmcs.st12 billno(10)

before.program:
query.extension = "lhitm002.suno <> '' and lhitm002.itmn in (select itmn from lhitm003 where prdt = 0)"

main.table.io:
after.read:
long i

select blno:billno
from lhitm003
where lhitm003.itmn = :lhitm002.itmn
selectdo
attr.element = i
display("billno")
i=i+1
endselect

Tables: lhitm002 (items) Indices: 1. itmn 2. suno + itmn
lhitm003 (bills) Indices: 1. itmn + blno

itmn is item no, suno is vendor code and blno is the bill no.

I have created display session on the items table to display items vendor code wise. Now, i want to display all the bills for each item. Hope, this code will make my problem more clear.

Thanks.
Reply With Quote
  #13  
Old 19th March 2008, 09:40
en@frrom en@frrom is offline
Guru
 
Join Date: Aug 2003
Location: Belgium
Posts: 1,219
en@frrom will become famous soon enough
Baan: B50B - DB: Oracle 8.0 - OS: Win2k AS
What form type is it? Maybe you can include a printscreen of your form as well?
__________________
Member of Baan Board

Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #14  
Old 19th March 2008, 10:22
Ankita Ankita is offline
Member
 
Join Date: Dec 2007
Posts: 43
Ankita is on a distinguished road
Baan: IV c4 - DB: Informix - OS: Sun Solaris
Hello,

Thank you for the quick reply. Form type is 3.

As you can see in the form, only one bill is shown for one item no. But there are 3 bills in the table. It is showing the last bill no. for that item.

Thanks.
Attached Images
File Type: jpg form.JPG (34.5 KB, 32 views)
Reply With Quote
  #15  
Old 19th March 2008, 23:20
csecgn's Avatar
csecgn csecgn is offline
Guru
 
Join Date: Aug 2004
Location: Cologne/Germany
Posts: 300
csecgn is on a distinguished road
Baan: IVc4 SP14 (Tools SP 21) ; LN 6.1 (Testing) - DB: Oracle - OS: Solaris
If I see correctly lhitm002 is your maintable. This will not work because lhitm002 has only one record for each item (or maybe more if you have more suppieres). The count of records in a form is controlled by the count of records in the maintable. You cannot extend this by your own fields (ok, you can. But in this case your form is not controlled by your maintable and not a type 3 form).
Make lhitm003 maintable in your form an filter (or set the group) by the item from lhitm002.

hth

Regards
Christof
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
clear old occurences Francesco Tools Development 15 16th March 2005 23:19
Selecting recs for display on form JRussell Tools Development 0 25th October 2002 15:36
Problems with Display form field pjohns Tools Development 3 16th October 2002 14:37
Bold a form display field? Haggis Tools Development 4 21st May 2002 06:56


All times are GMT +2. The time now is 11:24.


©2001-2017 - Baanboard.com - Baanforums.com