rp_utils::getservicesbyrouteandcycle

This method is used to retrieve service details for all customers for specified cycles and routes

o.getservicesbyrouteandcycle( tcCycles, tcRoutes, tnResultMode, tcCursor)

Return Value

The number of services and associated charges as specified by the service diagram

Parameters

tcCycles
The route cycles that route records must have to be included in the returned service details.
Must be a comma separated list.

tcRoutes
The route numbers that route records must have to be included in the returned service details.
Must be a comma separated list.

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 function is a quick way to retrieve service information for specified cycles and routes.
It is not date specific and does not include any comments or work order information.
The data retrieved is as specified by the service diagram.

Example

* set the route cycles to include
lcCycles = "11,21,"

* Set the route numbers to include
lcRoutes = "1,2,3,4"

* Load results into oRows
lnResultMode = 31

lvRetval = o.GetServicesbyRouteandCycle(lcCycles, lcRoutes, lnResultMode)


The above would;
1.	Retrieve all route records and associated charge details as specified
	by the service diagram.
2.	These records would only be for routes 1,2,3,4 and cycles 11 and 21
3.	Place the list in the collection o.oRows


The field output of this function is as shown below;

	Servlink.id as "Serv_ID",
	Route.ID as "ROUTE_ID",
	Route.Route_Num as "Route_Num",
	Route.Account as "Account",
	Route.Day as "Day",
	Route.Sequence as "Sequence",
	Route.Stop_Date as "R_Stop_Date",
	Route.Schedule as "Schedule",
	Route.Active as "Active",
	Route.System as "System",
	Route.Day_Number as "Day_Number",
	Charge.id as "Charge_ID",
	Charge.Area as "Area",
	Charge.cycle as "cycle",
	Charge.code as "code",
	Charge.Descript as "Descript",
	Charge.Units as "Units",
	Charge.Reference as "Reference",
	Charge.Frequency as "Frequency",
	Charge.Start_Date as "C_Start_Date",
	Charge.Stop_Date as "C_Stop_Date",
	Charge.Contract as "Contract",
	Charge.History "History",
	code.Factor as "Size",
	code.Factor*Charge.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_phoneas "site_phone",
	customer.Latitude as "Latitude",
	customer.Longitude as "Longitude"

See also:

Class rp_utils


Last Updated: 23/11/2005