MENU
    Segment4_Retrieve
    • 1 Minute to read
    • Dark
    • PDF

    Segment4_Retrieve

    • Dark
    • PDF

    Article summary

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

    Syntax

    Segment4 = api.Segment4_Retrieve (SegmentFilter FilterCriteria)
    Shell

    Usage

    Use the Segment4_Retrieve call to retrieve Segment4 data. When a Client application invokes the Segment4_Retrieve call, it passes in the segment1 filter criteria in collection of SegmentFilter objects to filter the data rows.

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

    Arguments List

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

    NameTypeDescription

    SegmentFilter

    SegmentFilter()

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

    Response

    Segment4()

    The Segment4_Retrieve method call returns collection of Segment4 objects, which contain the data values of segment4 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 RetrieveSegment4()
      Dim api As New HostAPI()
      'This method retrieves all segment4 objects that start with the code specified.
      Dim objSegment4() As Segment4, objSegment4Filter As Segment4Filter
      Dim objSegment4FilterCollection() As Segment4Filters, strValue() As String
      Try
      	'Create a new segment4 filter to add the filter criteria during retrieval
      	objSegment4Filter = New Segment4Filter
      	objSegment4Filter.Field = Segment4Field.Code
      	objSegment4Filter.FieldOperator = FieldOperator.StartsWith
      	ReDim strValue(0)
      	strValue(0) = "10"
      	objSegment4Filter.Value = strValue
      	'Add the filter objects built to the filter collection to pass to the web method
      	ReDim objSegment4FilterCollection(0)
      	objSegment4FilterCollection(0) = New Segment4Filter
      	objSegment4FilterCollection(0) = objSegment4Filter
      	'Call the web method to retrieve the segment4 collection
      	objSegment4 = api.Segment4_Retrieve (objSegment4FilterCollection)
      	'Loop through the segment4 collection to display the segment4 objects retrieved
      	If Not objSegment4 is Nothing Then
      		Console.WriteLine ("Code" & vbTab & "|" &_Obj.Name & vbTab &
      		"|AccountGroup" & vbTab & "|AccountyType")
      		For Each _Obj As Segment4 In objSegment4
      			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?