MENU

📢 March Release Updates coming soon!

    Segment6_Retrieve
    • 1 Minute to read
    • Dark
    • PDF

    Segment6_Retrieve

    • Dark
    • PDF

    Article summary

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

    Syntax

    Segment6 = api.Segment6_Retrieve (SegmentFilter FilterCriteria)
    Shell

    Usage

    Use the Segment6_Retrieve call to retrieve Segment6 data. When a Client application invokes the Segment6_Retrieve call, it passes in the segment6 filter criteria in collection of SegmentFilter objects to filter the data rows.

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

    Arguments List

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

    NameTypeDescription

    SegmentFilter

    SegmentFilter()

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

    Response

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