254770
|
Version :
|
Copyright OBS Logistics © 2008
The information contained herein is the property of OBS Logistics and is supplied without liability for errors or omissions. No part may be reproduced or used except as authorised by contract or other written permission. The copyright and foregoing restriction on reproduction and use extend to all media in which the information may be embodied
Contents
[#1.Functional Overview|outline 1. Functional Overview3]
[#1.1.Client Requirement|outline 1.1 Client Requirement3]
[#1.2.Solution|outline 1.2 Solution3]
[#1.3.Scope|outline 1.3 Scope3]
[#2.Set-up|outline 2. Set-up4]
[#2.1.Pre-requisites|outline 2.1 Pre-requisites4]
[#2.2.Menu Structure|outline 2.2 Menu Structure4]
[#2.3.Data|outline 2.3 Data4]
[#3.Functional Description|outline 3. Functional Description5]
Appendix A table updates REQUIRED6
Appendix B QUOTE & DoCuMENT History7= Functional Overview =
Client Requirement
1: MTS Modules/Trip Management/Trip Planning & Trip Manipulation/Trip Filter - DEPOT Filter - Sort list Alphabetically. Sort by Location ID (1st column)Added by Suk Sandhu 29/07/08 It seems that the depot list should be sorted alphabetically by location code and not location name. Also any depots which have numerical values at the beginning of their depot code should appear at the top of the list followed in alphabetical order. This should also be applied to Collect From and Deliver to Fields also.
Solution
Amend the Record Group which populates the list of Values for Collection From and Delivery to locations. Currently the record group is ordered by location name, amend this to location Id.
The order by clause in Oracle will always order alphabetically ahead of numerically for alphanumeric values. The request is for the numerical location ids to be displayed before the alphabetical location ids.
To allow this, we will create a new column called sort which will contain the location id, if the value is numeric or 0 if the value is alphabetical. We will use this field to complete a primary sort which will place all numerics at the top and then perform a secondary sort on location_id, which will then sort all alphabetical values under the numerics. The sort column will never be visible to the user.
The development requires a new field called sort, automated population of the sort field and a change to the ALL_LOCATIONS record group.
Scope
This change will be applied to system version 10.5 on CONTST and once approved CONPRD.
Set-up
Pre-requisites
None
Menu Structure
Unchanged
Data
A non database item called Sort will be added to the Trip detail data block. This will be used to hold the value 0 or 1 depending on the value of Location id.
If Location id is numeric, then sort will be set to 1, if location id is alphanumeric then sort will be set to 0.
Functional Description
The owning depot field is attached to a command button which launches a List of Values. Currently list of values displays the location name and location id, in order of the location name. This will be amended to display the list in order of location id.
In addition, the user has requested that all numeric location ids are displayed first in the list this will be accomplished using a Non Database item called ‘SORT’. This item will be populated with a numeric value depending on the location id.
The Record group will then be ordered by 2 values, the sort column followed by the location id. The first ‘order by’ will separate the numeric locations from the alphanumeric locations and the second ‘order by’ will ensure that the numeric locations are in order, followed by alphanumeric locations in order.
When the form is opened the SORT field will be automatically populated from a procedure SET_ORDER. The SET_ORDER procedure will use a cursor to loop through the location id in GEO_LOCATION and set the value of the SORT field using a case statement.
The case statement will list the different scenarios for location_id and how the sort field is populated for each one.
CASE
WHEN V_LOCATION_ID LIKE ('0%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('1%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('2%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('3%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('4%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('5%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('6%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('7%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('8%') THEN :TRIP_DTL.SORT :=1;
WHEN V_LOCATION_ID LIKE ('9%') THEN :TRIP_DTL.SORT :=1;
ELSE :TRIP_DTL.SORT := 1;
END CASE;
The above case statement sets SORT to 1 for any location_ids beginning with a numeric value. Every other location id sets the SORT field to 2.
This procedure will be called from the WHEN_NEW_FORM_INSTANCE trigger, ensuring that sort is populated when the screen is launched.
-
-
-
-
-
-
-
-
- table updates REQUIRED
-
-
-
-
-
-
-
No table changes are required for this development
-
-
-
-
-
-
-
-
- QUOTE & DoCuMENT History
-
-
-
-
-
-
-
Activity | ||||
Cost (£) Exc. VAT | ||||
Change Request Evaluation | ||||
Functional Specification | ||||
Technical Specification | ||||
Development | ||||
Testing & Release | ||||
Implementation | ||||
==== TOTAL ==== |
References
EST 254770 PA-7JJFWR Trip Filter.doc | |||
Glossary
Document History
Initial version | ||||
Review & Issue | ||||
Authorised By
Dave Meir | Development Manager | |
Suk Sandhu | TMSCC MTS Product Manager |