Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
14%
200 - 500 GB
32%
500 - 800 GB
4%
800 - 1200 GB
4%
1200 - 1500 GB
11%
1500 - 2000 GB
14%
> 2000 GB
21%
Total votes: 28

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 6th August 2018, 11:16
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
order by no function
Baan: ERP LN 6.1 FP11 (Infor ERP 10.5)
C/S: None/Unknown

Hi,

I have customize a new table and new session. How can I display the data on session sort by section and length.
Eg:
-------------------------------------------------------------
| Section | Length | Qty |
-------------------------------------------------------------
| section B | 340 | 2 |
| section B | 103 | 18 |
| section A | 500 | 3 |
| section A | 205 | 10 |
| section A | 40 | 1 |
-------------------------------------------------------------
I wrote a code as below,
Code:
|****************** declaration section *********************
declaration:
	table   ttccus024 | Short Bar List

|******************** program section *********************
before.display.object:
	get.record.field.readonly()

|********************** function **************************
Functions:

function get.record.field.readonly()
{
	select tccus024.*
	from tccus024
	where tccus024.sect = :tccus024.sect and tccus024.lgth = :tccus024.lgth
	order by tccus024.sect desc, tccus024.lgth desc
	selectdo
	endselect
}
when run the session is display as below:

-------------------------------------------------------------
| Section | Length | Qty |
-------------------------------------------------------------
| section A | 40 | 1 |
| section A | 205 | 10 |
| section A | 500 | 3 |
| section B | 103 | 18 |
| section B | 340 | 2 |
-------------------------------------------------------------

Please advise.

Last edited by tracylee : 6th August 2018 at 12:07.
Reply With Quote
  #2  
Old 6th August 2018, 11:42
Sahil Sharma Sahil Sharma is offline
Junior Member
 
Join Date: Jul 2018
Posts: 15
Sahil Sharma is on a distinguished road
Baan: FP 10.4 - DB: BAAN - OS: windows 10
As per your requirement, the session results are correct.
the data is sorted as per the section first making the length field its subset.
Reply With Quote
  #3  
Old 6th August 2018, 15:08
giggty's Avatar
giggty giggty is offline
Senior Member
 
Join Date: May 2017
Posts: 104
giggty is on a distinguished road
Baan: Infor ERP 10.6 - DB: MSSQL Server 2008 R2 - OS: Windows Server 2012
Consider using query.extend.order("tccus024.sect desc, tccus024.lgth desc") or query.define.sort.order().
Reply With Quote
Sponsored Links
  #4  
Old 7th August 2018, 03:49
tracylee tracylee is offline
Member
 
Join Date: Sep 2011
Posts: 71
tracylee is on a distinguished road
Baan: ERP LN 6.1 - DB: MYSQL - OS: ERP LN
Quote:
Originally Posted by giggty View Post
Consider using query.extend.order("tccus024.sect desc, tccus024.lgth desc") or query.define.sort.order().

Hi,

Thanks for your help. Now can display correctly when using query.define.sort.order().
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
Performance Issue: Planned Production Order ashishjain Tools Development 0 22nd November 2011 20:37
Reference Table for t_kkor askolits Miscellaneous 8 19th January 2009 09:45
Deleting Lines In Servicxe Order after making PO riazsayeed Project & Services 2 6th July 2004 07:14
Once Transfer Order, Inspection function sonic2297 Distribution, Transportation & Warehousing 1 4th July 2002 12:44


All times are GMT +2. The time now is 20:45.


©2001-2018 - Baanboard.com - Baanforums.com