Version:
  1. Web service GetData

    Article: AN0002068 Displayed: 768x

    This method reads one record from a particular class or query.

    Definition

    OGDataResult GetData(string modelCode, string parentCode, int parentType, int id)

    Parameter modelCode is a code of a model.

    Parameter parentCode is a code of a class or query from the model entered by parameter modelCode.

    Parameter parentType defines if  parentCode is a class or a query.

    Value Description
    0 Class
    1 Query

    Parameter parentId is class or query Id.

    Parameter Id is Id of the record that shall be read from the ObjectGears system.

    Example

    Calling method by means of ID or model and class code.

    $ws = 'http://localhost:55668/OGService.asmx?WSDL'
    $source = New-WebServiceProxy -Uri $ws -UseDefaultCredential

    #reading variables from WebService
    $OGData = $source.GetType().Namespace + '.OGData'

    #calling method
    $objData = $source.GetData('jira', 'ukol', 0, 100)

    #enumeration of column collection of the given class record
    foreach($data in $objData.Datas)
    {
      foreach($item in $data.ColumnData)
      {
        #Key = column ID
        #Value = column value
        Write-Host $item.Key - $item.Value
      }
    }

  2.    ---
    Your rating:
    Rated by users: 0x
  3. Top
SearchTitle
×