rp_utils::getworkorderservices

This returns work order and customer information for a specified date and run

o.getworkorderservices( tcRoutes,tddate,tcTypes, tcFilter, tnResultMode, tcCursor)

Return Value

The number of records found

Parameters

tcRoutes
A comma delimited list of routes for which you want the assigned route records
as per the service diagram

tdDate
The route date

tcTypes
The work order types to retrieve. Leave blank for all

tcFilter
Any valid filter you want to apply to the query. It must relate to the work order table

tnResultMode
This specifies how you want the data returned. For example 1 = XML , 31 = oRows data set

tcCursor
The name of the internal cursor to store the results

Remarks

This method returns a unique list of all work orders assigned to the
specified routes on the specified day. Note that this only returns
work orders at departments for which the auto dispatch flag
is set to true

The structure of the list as follows;

workordr.route as "Route",
workordr.day as "Day",
workordr.account as "Account",
workordr.work_order as "Work_Order",
workordercharge.code as "code",
workordercharge.Descript as "Descript",
workordercharge.Units as "Units",
code.factor as 'Size',
code.factor*workordercharge.units as 'Volume',
customer.site_name as "site_name",
customer.site_street_number as "site_street_number",
customer.site_street_suffix as "site_street_suffix",
customer.site_street_name as "site_street_name",
customer.site_city as "site_city",
customer.site_state as "site_state",
customer.site_phone as "site_phone",
customer.Latitude as "Latitude",
customer.Longitude as "Longitude"

Example

o.GetWorkOrderServices("535", {08/02/2002},"S","", 31, "Trecords")

The above would;
1.	Retrieve all "S" type work orders assigned to route 535 for the 08/02/2002
2.	Place this list in the internal cursor "TRecords"
3.	Place the list in the collection o.oRows

!!!  Warning for version 6.0311 and above !!!
With the new work order structure implemented in 6.0311 there will now be multiple
records in the table for each work order as determined by the number of charges assigned.
Hence if a work order has 2 charges assigned it will have two records in the resulting
table.  All work order data for these two records will be the same with the exception
of the work order charge data.  In the future it is planeed that the returned object will
have separate objects for each table and hence a one to many relationshiip can be used
to extract data from these objects.  This will be in addition to the current function so
it will not interfere with existing code using this function.



See also:

Class rp_utils


Last Updated: 23/11/2005