ObjectGears Help

Forum   ObjectGears (Version:

Web service GetDatas

This method reads more records from a particular class or a query.


OGDataResult GetDatas(OGData filter)

Set up of the object OGData for filtering is described at the object OGData.


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

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

#creation of filter object
$filter = New-Object($OGData)
#$filter.Id = 100
$filter.ParentType = 0

#calling by means of class ID
$filter.ParentId = 16

#calling by means of code
#$filter.ModelCode = 'mymodel'
#$filter.ParentCode = 'myclass'

#$filter.ReturnMetadata = 1
#$filter.LanguageCode = 'cs-CZ'

#calling method
$objData = $source.GetDatas($filter)

#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

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information