ISCountryItem.GetStatesList

Description

This function returns the list of states for the country, if any.

Syntax

object.GetStatesList()

Part Attribute Type Description
object Required
The object always implements the ISCountryItem interface

Return Value

ISStates

Returns the list of states for the country, if any.

Example

Display the collection of country items loaded from Profile and the list of states for the country, if any.

Dim aCountryItems, aCountryItem
Dim aMessage
Dim aStatesList
Dim aState
Dim i, j

Set aCountryItems = Profile.LoadCountryList
aMessage = "Country Items Count: " & aCountryItems.Count 

for i = 0 to aCountryItems.Count - 1 
  set aCountryItem = aCountryItems.Item(i)
  set aStatesList = aCountryItem.GetStatesList 
  
  aMessage = aMessage & vbNewLine & (i+1) & ") " & aCountryItem.LongName 
  if not aStatesList is nothing then
    aMessage = aMessage & vbNewLine & "  States: "
    for j = 0 to aStatesList.Count - 1
      set aState = aStatesList.Item (j)
      aMessage = aMessage & vbNewLine & "  -" & aState.Description 
    next
  end if
next  
 
Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface the States List cannot be found, but Country Items for the patient can be found in Patient > Alter Patient > General > Street Address.

Version information

Added in v7.8.0