forked from microsoft/BCApps
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GetCollectionType to Edit-In Excel API (microsoft#550)
<!-- Thank you for submitting a Pull Request. If you're new to contributing to BCApps please read our pull request guideline below * https://github.com/microsoft/BCApps/Contributing.md --> #### Summary <!-- Provide a general summary of your changes --> The issue We have received this issue: microsoft/ALAppExtensions#21940 where the programmer wants to move all of the filters from one field to another. The only thing missing for this capability is that we should be able to dynamically detect if the filter is a AND or OR expression, this is not possible in the current implementation. Expected behavior We should expose the "Edit in Excel Filter Collection Type" property on the filter through the API, such that clients of the API can dynamically detect what collection type the filter has. #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes [AB#498510](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/498510/) --------- Co-authored-by: Matti Nielsen <[email protected]>
- Loading branch information
1 parent
79ee4d0
commit 302e4bf
Showing
7 changed files
with
194 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/System Application/App/Edit in Excel/src/Filters/EditInExcelFieldFilterv2.Interface.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// ------------------------------------------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
// ------------------------------------------------------------------------------------------------ | ||
|
||
namespace System.Integration.Excel; | ||
|
||
/// <summary> | ||
/// This codeunit provides an interface to create a filter for a specific field for Edit in Excel. | ||
/// </summary> | ||
interface "Edit in Excel Field Filter v2" | ||
{ | ||
Access = Public; | ||
|
||
/// <summary> | ||
/// Add a filter value | ||
/// </summary> | ||
/// <param name="EditInExcelFilterType">The filter type, such as Equal, Greater than.</param> | ||
/// <param name="FilterValue">The value which the field should be Equal to, Greater than etc.</param> | ||
procedure AddFilterValueV2(EditInExcelFilterType: Enum "Edit in Excel Filter Type"; FilterValue: Text): Interface "Edit in Excel Field Filter v2" | ||
|
||
/// <summary> | ||
/// Get a specific filter | ||
/// </summary> | ||
/// <param name="Index">The index of the filter.</param> | ||
/// <param name="EditInExcelFilterType">The filter type, such as Equal, Greater than.</param> | ||
/// <param name="FilterValue">The value which the field should be Equal to, Greater than etc.</param> | ||
procedure Get(Index: Integer; var EditinExcelFilterType: Enum "Edit in Excel Filter Type"; var FilterValue: Text) | ||
|
||
/// <summary> | ||
/// Get the filter collection type | ||
/// </summary> | ||
/// <returns>The collection type of the filter</returns> | ||
procedure GetCollectionType(): Enum "Edit in Excel Filter Collection Type" | ||
|
||
/// <summary> | ||
/// Remove a specific filter | ||
/// </summary> | ||
/// <param name="Index">The index of the filter.</param> | ||
procedure Remove(Index: Integer) | ||
|
||
/// <summary> | ||
/// Counts the number of filters | ||
/// </summary> | ||
/// <returns>The number of filters</returns> | ||
procedure Count(): Integer | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters