ISServicePrices.Item

Description

Each of the service prices within the collection.

Syntax

object.Item(aIndex)

Part Attribute Type Description
object Required
The object always implements the ISServicePrices interface
aIndex In, Required
int
The index of the service price
Restriction: This property is readonly.

Return Value

ISServicePrice

Example

Display the number of the service prices and some information about them.

Dim aFilter
Dim aServices
Dim aService
Dim aMessage
Dim aServicePrices
Dim aServicePrice
Dim i

Set aFilter = Profile.CreateServicesFilter
aFilter.Description = "Pinch Skin Graft"

set aServices = Profile.LoadServicesByFilter(aFilter)

aMessage = "Services Count = " & aServices.Count & vbNewLine

for i = 0 to aServices.Count - 1
  set aService = aServices.Item(i)

  set aServicePrices = aService.GetServicePrices

  aMessage = aMessage & vbNewLine & aService.Description &_
    " has " & aServicePrices.Count & " service prices"
  set aServicePrice = aService.GetServicePrice
  if aServicePrice is nothing then
    aMessage =  vbNewLine & "No Service Price"
  else
    aMessage = aMessage & vbNewLine & "-----------------------------" & vbNewLine &_
      "Agency Code: " & aServicePrice.AgencyCode & vbNewLine &_
      "Amount: " & aServicePrice.Amount & vbNewLine &_
      "Custom Fee Per Unit: " & aServicePrice.CustomFeePerUnit & vbNewLine &_
      "Default Quantity: " & aServicePrice.DefaultQuantity & vbNewLine &_
      "Start Date: " & aServicePrice.StartDate & vbNewLine &_
      "End Date: " & aServicePrice.EndDate & vbNewLine &_
      "Distance: " & aServicePrice.Distance & vbNewLine
   end if

next 

Profile.MsgBox(aMessage) 
               
Note:

In Profile Client v8 on User Interface Service Prices can be found in Maintain > Services > Edit the selected service > Financial.

Version information

Added in v8.3.0