- 1 Minute to read
- Print
- DarkLight
- PDF
Segment4_Retrieve
- 1 Minute to read
- Print
- DarkLight
- PDF
Usage
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.
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.
Request
Shell Syntax
Segment4 = api.Segment4_Retrieve (SegmentFilter FilterCriteria)
XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.HostAnalytics.com/API/SOAP/StateFree/Common/2009/03/19">
<soapenv:Header/>
<soapenv:Body>
<ns:Segment4_RetrieveWithLogin>
<ns:LoginName>***</ns:LoginName>
<ns:Password>***</ns:Password>
<ns:TenantCode>***</ns:TenantCode>
</ns:Segment4_RetrieveWithLogin>
</soapenv:Body>
</soapenv:Envelope>
Arguments List
The following table provides a list of arguments that are required for the Segment4_Retrieve method call:
Name | Type | Description |
---|---|---|
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.
Shell Syntax
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