ObjectGears Help

Forum   ObjectGears (Version:

Web service GetDataByFilter

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


OGDataResult GetDataByFilter(OGData filter)

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

If the filter set up enables finding more records, only one is returned.


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'

#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.GetDataByFilter($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