Show / Hide Table of Contents

GetStateObjid

Object and Type

Object  : FCApplication

Type     : Method

Prototype

Public Function GetStateObjid(ByVal Country As String, ByVal State As String) As Long

Description

This method returns an objid for a given state in a given country. If the state or country is not found, this method returns a value of zero. The state and country tables are cached in the FCApplication object, so this method does not cause a database round-trip.

Note: The state name supplied should be the "short" name (such as "TX").

Parameters

Parameter Name Required? Description
Country Yes Name of country.
State Yes Name of state to get the objid for.

Returns

The objid of the state. Zero, if the state or country is not found.

Error Codes

Value Meaning
10011 Country must not be empty.
10013 State must not be empty.

Examples

The following example checks is a given state from a posted form is valid for the posted country.

JavaScript:

var country = Request.Form("country").Item;
var state = Request.Form("state").Item;
var StateObjid = FCApp.GetStateObjid(country,state;
If (StateObjid > 0)
{
  Response.Write(state + " is a valid state in " + country);
}
else
{
  Response.Write(state + " is NOT a valid state in " + country);
}
Back to top © 2022 Dovetail Software, Inc. - All rights reserved.
Clarify, Amdocs, and related products and names are copyright and trademark of Amdocs, Inc.
.NET, Visual Studio.NET, C#, Visual Basic and related products are trademark of Microsoft corporation.