MENU
    Segment5_Retrieve
    • 1 Minute to read
    • Dark
    • PDF

    Segment5_Retrieve

    • Dark
    • PDF

    Article summary

    Retrieves the collection of Segment5 objects that meet the filter criteria supplied. Each segment5 object returned from this method corresponds to a data row of segment5 in database.

    Syntax

    Segment5 = api.Segment5_Retrieve (SegmentFilter FilterCriteria)
    Shell

    Usage

    Use the Segment5_Retrieve call to retrieve Segment5 data. When a Client application invokes the Segment5_Retrieve call, it passes in the segment5 filter criteria in collection of SegmentFilter objects to filter the data rows.

    Upon invocation, the f queries the database for segment5 data rows with the specified filter criteria and returns the collection of segment5 objects. Each segment5 object corresponds to a data row in the database. The Client application can then use methods on the collection of segment5 objects to iterate through the collection and retrieve information. The Client application must be logged in with sufficient access rights to query segment5 objects.

    Arguments List

    The following table provides a list of arguments that are required for the Segment5_Retrieve method call:

    NameTypeDescription

    SegmentFilter

    SegmentFilter()

    Collection of segment5 filter objects to filter the segment5 data rows during retrieval.

    Response

    The Segment5_Retrieve method call returns collection of Segment5 objects which contain the data values of segment5 data rows in the database. In recent updates, the retrieved data will also have the IDs of all the Leaf, Roll-Up, and Parent Members.

    Sample Code

    Private Sub RetrieveSegment5()
      Dim api As New HostAPI()
      'This method retrieves all segment objects that start with the code specified.
      Dim objSegment5() As Segment5, objSegment5Filter As Segment5Filter
      Dim objSegment5FilterCollection() As Segment5Filters, strValue() As String
      Try
      	'Create a new segment5 filter to add the filter criteria during retrieval
      	objSegment5Filter = New Segment5Filter
      	objSegment5Filter.Field = Segment5Field.Code
      	objSegment5Filter.FieldOperator = FieldOperator.StartsWith
      	ReDim strValue(0)
      	strValue(0) = "10"
      	objSegment5Filter.Value = strValue
      	'Add the filter objects built to the filter collection to pass to the web method
      	ReDim objSegment5FilterCollection(0)
      	objSegment5FilterCollection(0) = New Segment5Filter
      	objSegment5FilterCollection(0) = objSegment5Filter
      	'Call the web method to retrieve the segment5 collection
      	objSegment5 = api.Segment5_Retrieve (objSegment5FilterCollection)
      	'Loop through the segment5 collection to display the segment5 objects retrieved
      	If Not objSegment5 is Nothing Then
      		Console.WriteLine ("Code" & vbTab & "|" &_Obj.Name & vbTab &
      		"|AccountGroup" & vbTab & "|AccountyType")
      		For Each _Obj As Segment5 In objSegment5
      			Console.WriteLine (_Obj.Code & vbTab & "|" _Obj.Name & vbTab &
      			"|" & _Obj.AccountGroup.ToString() & vbTab & "|" &
      			_Obj.AccountType.ToString())
      		Next
      	End If
      	Console.ReadLine()
      Catch ex As Exception
      End Try
    End Sub
    Shell

    Was this article helpful?