Artikel: AN0002069Aktualisiert:
Die vorgegebene Sprachenversion vom Artikeltext wird angezeigt, weil es kein Text von der ausgewählten Sprache und Version gibt.
This method reads one data record from a class or a query.
Definition
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.
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'
#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
}
}