Codeunit "Edit in Excel Filters"
This codeunit provides an interface to create filters for Edit in Excel.
Properties
| Name | Value |
|---|---|
| Access | Public |
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
AddFieldV2
Add the specified field using 'and' collection type.
procedure AddFieldV2(ODataFieldName: Text, EditInExcelEdmType: Enum "Edit in Excel Edm Type"): Interface "Edit in Excel Field Filter v2"
Parameters
| Name | Type | Description |
|---|---|---|
| ODataFieldName | Text |
The OData name of the field referenced. |
| EditInExcelEdmType | Enum System.Integration.Excel."Edit in Excel Edm Type" |
The Edm type of the OData field as specified in the $metadata document. |
Returns
| Type | Description |
|---|---|
| Interface System.Integration.Excel."Edit in Excel Field Filter v2" |
AddFieldV2
Add the specified field with a specified collection type.
procedure AddFieldV2(ODataFieldName: Text, EditInExcelFilterOperatorType: Enum "Edit in Excel Filter Collection Type", EditInExcelEdmType: Enum "Edit in Excel Edm Type"): Interface "Edit in Excel Field Filter v2"
Parameters
| Name | Type | Description |
|---|---|---|
| ODataFieldName | Text |
The OData name of the field referenced. |
| EditInExcelFilterOperatorType | Enum System.Integration.Excel."Edit in Excel Filter Collection Type" |
Specifies whether filters for this field have 'and' or 'or', such as Field1 = a|b|c (or operator) or Field1 = <a&>b>amp;>c (and operator). Both operators for the same field is currently not supported. |
| EditInExcelEdmType | Enum System.Integration.Excel."Edit in Excel Edm Type" |
The Edm type of the OData field as specified in the $metadata document. |
Returns
| Type | Description |
|---|---|
| Interface System.Integration.Excel."Edit in Excel Field Filter v2" |
AddFieldV2
Add the specified field with an initial value using 'and' collection type. This is mainly intended for fields that only filter on a single value.
procedure AddFieldV2(ODataFieldName: Text, EditInExcelFilterType: Enum "Edit in Excel Filter Type", FilterValue: Text, EditInExcelEdmType: Enum "Edit in Excel Edm Type")
Parameters
| Name | Type | Description |
|---|---|---|
| ODataFieldName | Text |
The OData name of the field referenced. |
| EditInExcelFilterType | Enum System.Integration.Excel."Edit in Excel Filter Type" |
The filter type, such as Equal, Greater than etc. |
| FilterValue | Text |
The value which the field should be Equal to, Greater than etc. |
| EditInExcelEdmType | Enum System.Integration.Excel."Edit in Excel Edm Type" |
The Edm type of the OData field as specified in the $metadata document. |
GetV2
Get the field filters for the specified field.
procedure GetV2(ODataFieldName: Text): Interface "Edit in Excel Field Filter v2"
Parameters
| Name | Type | Description |
|---|---|---|
| ODataFieldName | Text |
The OData name of the field referenced. |
Returns
| Type | Description |
|---|---|
| Interface System.Integration.Excel."Edit in Excel Field Filter v2" |
Remove
Removes the filter for the specified field.
procedure Remove(ODataFieldName: Text): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| ODataFieldName | Text |
The OData name of the field referenced. |
Returns
| Type | Description |
|---|---|
| Boolean |
Whether the field was removed. |
Contains
Check whether there is a filter for the specified field.
procedure Contains(ODataFieldName: Text): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| ODataFieldName | Text |
The OData name of the field referenced. |
Returns
| Type | Description |
|---|---|
| Boolean |
Whether the field has been added. Note this returns true even if there are no filters. |