CloseFieldFilterState

Syntax

CloseFieldFilterStateResult CloseFieldFilterState(OdId tOb, CloseFieldFilterStateArg tArg)

Parameters

tOb. Moniker of opened relational object instance.

tArg. Operation execution parameters.

Description

The CloseFieldFilterState operation closes autofilter settings storage area by field values.

Comments

Before executing this operation, the CreateFieldFilterState operation must be executed for the corresponding field. Autofilter settings can be changed between executing the CreateFieldFilterState and CloseFieldFilterState operations. The GetFieldValues and SetFieldFilter operations are used for this purpose. To execute the CloseFieldFilterState operation, in the tOb field specify moniker of opened relational object instance, and in the tArg field specify closing parameters. The tArg.add field is used once for source fields during initial creation and saving of autofilter settings. The settings can be overwritten subsequently using the tArg.save field. In tArg one should also set moniker of the relation object cache that can be obtained using the GetTable/GetQuery operations with the cachedDataset field specified in the pattern.

The operation result determines whether the autofilter settings storage area is closed successfully.

Example

It is assumed that there is the table opened for view, table moniker and table cache moniker are obtained. The table contains a field with the REGION identifier.

Below is the example closing the autofilter settings storage area for the specified table field. The request contains two monikers, field identifier, and the execute operation. The response contains whether the settings storage area is closed successfully.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CloseFieldFilterState xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>NLDGBACJHDEIGOAEOJMGHOOJDGJFPBFEFJEKHLKPOKBAEPOF!M!S!TABLECMPCMBCJHDEIGOAEHNKFEHGJCOOAFFIEIJCFENIDGAPBKEPP</id>
  </tOb>
<tArg xmlns="">
  <columnId>REGION</columnId>
<cachedDatasetId>
  <id>NLDGBACJHDEIGOAEOJMGHOOJDGJFPBFEFJEKHLKPOKBAEPOF!M!S!CACHEDDATASETOKBHDCCJHDEIGOAEPEALCLNDILEJPILEBJGJBCLICJLOHKBD</id>
  </cachedDatasetId>
  <save>true</save>
  <add>false</add>
  </tArg>
  </CloseFieldFilterState>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<CloseFieldFilterStateResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <success xmlns="">1</success>
  </CloseFieldFilterStateResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CloseFieldFilterState" :
{
"tOb" :
{
"id" : "NLDGBACJHDEIGOAEOJMGHOOJDGJFPBFEFJEKHLKPOKBAEPOF!M!S!TABLECMPCMBCJHDEIGOAEHNKFEHGJCOOAFFIEIJCFENIDGAPBKEPP"
},
"tArg" :
{
"columnId" : "REGION",
"cachedDatasetId" :
{
"id" : "NLDGBACJHDEIGOAEOJMGHOOJDGJFPBFEFJEKHLKPOKBAEPOF!M!S!CACHEDDATASETOKBHDCCJHDEIGOAEPEALCLNDILEJPILEBJGJBCLICJLOHKBD"
},
"save" : "true",
"add" : "false"
}
}
}

JSON response:

{
"CloseFieldFilterStateResult" :
{
"success" : "1"
}
}
public static CloseFieldFilterStateResult CloseFieldFilterState(string tableMoniker, string tableCacheMoniker, string fieldId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tClose = new CloseFieldFilterState()
{
tArg = new CloseFieldFilterStateArg()
{
cachedDatasetId = new OdId() { id = tableCacheMoniker },
columnId = fieldId,
add = false,
save = true
},
tOb = new OdId() { id = tableMoniker }
};
// Close autofilter settings storage area
var result = somClient.CloseFieldFilterState(tClose);
return result;
}

See also:

Working with Relational Objects of Repository