Segment1_Retrieve
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Segment1_Retrieve

  • Dark
    Light
  • PDF

Article summary

Usage

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

Use the Segment1_Retrieve call to retrieve Segment1 data. When a Client application invokes the Segment1_Retrieve call, it passes the segment1 filter criteria in collection of Segment1Filter objects to filter the data rows.

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

Request

Shell Syntax

Segment1 = api.Segment1_Retrieve (Segment1Filter 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:Segment1_RetrieveWithLogin>
        <ns:LoginName>***</ns:LoginName>
        <ns:Password>***</ns:Password>
        <ns:TenantCode>***</ns:TenantCode>
    </ns:Segment1_RetrieveWithLogin>
   </soapenv:Body>
</soapenv:Envelope>

Arguments List

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

Name
Type
Description

Segment1Filter

Segment1F

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

Response

The Segment1_Retrieve method call returns a collection of Segment1 objects, which contain the data values of segment1 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.

Parent Code, Parent Name

There are two separate fields (i.e., columns) for Parent Code and Parent Name.

Shell Syntax

Private Sub RetrieveSegment1()
  Dim api As New HostAPI()
  'This method retrieves all segment1 objects that start with the code specified.
  Dim objSegment1() As Segment1, objSegment1Filter As Segment1Filter
  Dim objSegment1FilterCollection() As Segment1Filters, strValue() As String
  Try
  	'Create a new segment1 filter to add the filter criteria during retrieval
  	objSegment1Filter = New Segment1Filter
  	objSegment1Filter.Field = Segment1Field.Code
  	objSegment1Filter.FieldOperator = FieldOperator.StartsWith 
  	ReDim strValue(0)
  	strValue(0) = "10"
  	objSegment1Filter.Value = strValue
  	'Add the filter objects built to the filter collection to pass to the web method
  	ReDim objSegment1FilterCollection(0)
  	objSegment1FilterCollection(0) = New Segment1Filter
  	objSegment1FilterCollection(0) = objSegment1Filter
  	'Call the web method to retrieve the segment1 collection
  	objSegment1 = api.Segment1_Retrieve (objSegment1FilterCollection)
  	'Loop through the segment1 collection to display the segment1 objects retrieved
  	If Not objSegment1 is Nothing Then
  		Console.WriteLine ("Code" & vbTab & "|" &_Obj.Name & vbTab &
  		"|AccountGroup" & vbTab & "|AccountyType")
  		For Each _Obj As Segment1 In objSegment1
  			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
  	
  	

XML

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <Segment1_RetrieveWithLoginResponse xmlns="http://www.HostAnalytics.com/API/SOAP/StateFree/Common/2009/03/19">
         <Segment1_RetrieveWithLoginResult>
            <Segment1>
               <MemberId></MemberId>
               <Code/>
               <Name>Account Main</Name>
               <RollupOperator>
                  <Sign></Sign>
               </RollupOperator>
               <MemberType></MemberType>
               <ActiveStatus></ActiveStatus>
               <AccountType></AccountType>
               <AccountGroup></AccountGroup>
               <NormalDataInput></NormalDataInput>
               <CurrencyType>
                  <Code/>
                  <Name/>
               </CurrencyType>
               <CreditDebit></CreditDebit>
               <Variance></Variance>
               <ParentCode/>
               <TrialBalanceAccount></TrialBalanceAccount>
               <ReportCategoryName/>
               <RollupLevels/>
               <Attributes/>
               <Sort></Sort>
               <ParentMemberId></ParentMemberId>
               <ParentMemberCode/>
               <ParentMemberName/>
               <ParentMemberLabel/>
            </Segment1>
         </Segment1_RetrieveWithLoginResult>
      </Segment1_RetrieveWithLoginResponse>
   </soap:Body>
</soap:Envelope>

Was this article helpful?