FormulaInsights.XrmToolBox
1.0.2
See the version list below for details.
dotnet add package FormulaInsights.XrmToolBox --version 1.0.2
NuGet\Install-Package FormulaInsights.XrmToolBox -Version 1.0.2
<PackageReference Include="FormulaInsights.XrmToolBox" Version="1.0.2" />
<PackageVersion Include="FormulaInsights.XrmToolBox" Version="1.0.2" />
<PackageReference Include="FormulaInsights.XrmToolBox" />
paket add FormulaInsights.XrmToolBox --version 1.0.2
#r "nuget: FormulaInsights.XrmToolBox, 1.0.2"
#:package FormulaInsights.XrmToolBox@1.0.2
#addin nuget:?package=FormulaInsights.XrmToolBox&version=1.0.2
#tool nuget:?package=FormulaInsights.XrmToolBox&version=1.0.2
Formula Insights - XrmToolBox Plugin
Formula Insights is a comprehensive XrmToolBox plugin for analyzing and visualizing Microsoft Dataverse calculated columns, rollup fields, and formula columns with advanced XAML parsing and user-friendly structured display capabilities.
๐ฏ Project Status: PHASE 4 COMPLETE
โ User-Friendly Formula Display Implementation Successfully Delivered
- Phase 1-3: Core infrastructure, advanced UI, live Dataverse integration โ
- Phase 4: User-friendly formula display with intelligent XAML parsing โ
- Phase 4.1: Advanced ELSE/ELSE IF support with conditional logic parsing โ
๐ Key Features
๐ Formula Analysis & Visualization
- User-Friendly Display: Transform complex XAML FormulaDefinitions into readable, structured formats
- Calculated Field Support: Clear IF-THEN-ELSE logic with conditional branches and nested operations
- Rollup Field Support: Organized Source/Filters/Aggregation sections with tabbed interface
- Formula Column Support: Power Fx formula parsing and validation
- Toggle Views: Switch between structured display and raw XAML with single click
๐ Advanced XAML Parsing
- Intelligent Parser: Handles complex Dataverse FormulaDefinition structures with namespace resolution
- Operator Recognition: Automatically identifies Contains, Equal, GreaterThan, etc. with human-readable labels
- Variable Resolution: Extracts and resolves ActivityReference variables and parameters
- ELSE Logic Support: Complete support for simple ELSE and conditional ELSE IF structures
- Logical Operations: Proper parsing of AND, OR operations across all branches
๐จ Professional User Interface
- Tabbed Interface: Multiple views including Raw XAML, Technical Metadata, and User-Friendly Display
- Accessibility Compliant: Full WCAG 2.2 support with screen reader compatibility
- Export Capabilities: Copy XAML, Save As functionality with keyboard shortcuts (F5, Ctrl+C, Ctrl+S)
- Visual Indicators: Color-coded sections and clear visual hierarchy
- Error Handling: Graceful fallback to raw XAML when parsing encounters complex structures
๐ Dataverse Integration
- Live Connection: Direct integration with Dataverse Web API for real-time formula retrieval
- Entity Filtering: Browse formulas by entity with comprehensive filtering options
- Metadata Display: Technical metadata including creation dates, owners, and dependencies
- Formula Types: Support for Calculated, Rollup, and Power Fx formula columns
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UI Layer โ
โ (Tabbed Interface & User-Friendly Displays) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Parser Layer โ
โ (XAML Processing & Formula Analysis) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Service Layer โ
โ (Dataverse API & Formula Management) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Data Layer โ
โ (Models, Caching & State Management) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ ๏ธ Technology Stack
- .NET Framework 4.8 - XrmToolBox compatibility
- WinForms - Desktop UI with accessibility features
- Microsoft Dataverse Web API - Real-time formula retrieval and metadata
- Microsoft PowerFx - Power Fx formula parsing and validation
- Advanced XAML Processing - Custom namespace-aware parsing engine
- ScintillaNET - Syntax highlighting for raw XAML display
๐ Getting Started
Prerequisites
- XrmToolBox (latest version) - Download here
- .NET Framework 4.8 - Download here
- Microsoft Dataverse Environment - Access required for formula analysis
Installation
Option 1: XrmToolBox Plugin Store (Recommended)
- Open XrmToolBox
- Go to Configuration โ Manage Plugins
- Search for "Formula Insights"
- Click Install
- Restart XrmToolBox
Option 2: Manual Installation
- Download the latest release from Releases
- Extract the plugin files
- Copy all files to your XrmToolBox plugins folder:
%APPDATA%\MscrmTools\XrmToolBox\Plugins\
- Restart XrmToolBox
- Find "Formula Insights" in the Tools menu
Quick Start
- Connect to your Dataverse environment
- Select Entity from the dropdown to filter formulas
- Choose Formula from the list to analyze
- Switch Views using the tabs:
- User-Friendly View: Structured, readable display
- Raw XAML: Original formula definition
- Technical Metadata: Creation info, dependencies, etc.
๐งช Building from Source
Prerequisites for Development
- Visual Studio 2019+ with .NET Framework development workload
- Git for source control
Build Steps
# Clone the repository
git clone https://github.com/yourusername/XRMToolbox_CalcRollup.git
cd XRMToolbox_CalcRollup/CalculateRollupFieldPlugin
# Restore NuGet packages
nuget restore
# Build the solution
dotnet build --configuration Release
# Output files will be in bin/Release/
๐ Project Structure
CalculateRollupFieldPlugin/
โโโ Models/ # Core data structures
โ โโโ FormulaDefinitionMetadata.cs # Formula metadata model
โ โโโ ParsedFormula.cs # Parsed formula representation
โโโ Utils/ # Parsing and utility classes
โ โโโ UserFriendlyFormulaParser.cs # Advanced XAML parser
โ โโโ PowerFxFormulaParser.cs # Power Fx formula parser
โ โโโ SimpleExcelExporter.cs # Export functionality
โโโ Controls/ # UI components
โ โโโ UserFriendlyFormulaDisplayPanel.cs # Main display panel
โ โโโ CalculatedFormulaViewer.cs # Calculated field viewer
โ โโโ RollupFormulaViewer.cs # Rollup field viewer
โ โโโ PowerFxFormulaViewer.cs # Power Fx formula viewer
โโโ Services/ # Business logic and API clients
โ โโโ DataverseFormulaDefinitionService.cs # Formula retrieval
โ โโโ DataverseApiService.cs # Dataverse Web API client
โโโ Tests/ # Unit tests
โโโ TestFormulaParser.cs # Parser tests
โโโ SimpleTest.cs # Basic functionality tests
๐จ User Interface
Formula Display Examples
Calculated Field Formula
๐ Calculated Field Formula
๐ IF Conditions
- statuscode equals "1"
- name equals "test"
- Logical OR operation
โก THEN Actions
- Set 'calculatedfield' to "Active"
๐ ELSE IF Conditions
- statuscode equals "2"
โก THEN Actions
- Set 'calculatedfield' to "Inactive"
Rollup Field Formula
๐ฏ Rollup Field Configuration
๐ Source Entity: account
๐ Related Entity: contact (Parent Customer)
๐ Aggregation: Count of All Records
๐ Filters Applied:
- statecode equals "Active"
- createdon within last 30 days
๐ง Key Components
UserFriendlyFormulaParser
Advanced XAML parsing engine that:
- Handles complex Dataverse FormulaDefinition structures
- Resolves multiple XML namespaces (
mxswa
, default,x
) - Extracts ActivityReference arguments and variables
- Supports ELSE and ELSE IF conditional logic parsing
- Provides variable context building and resolution
Formula Display Panels
Specialized viewers for different formula types:
- CalculatedFormulaViewer: IF-THEN-ELSE logic with condition lists
- RollupFormulaViewer: Tabbed interface for Source/Filters/Aggregation
- PowerFxFormulaViewer: Power Fx formula validation and display
Dataverse Integration
- Live API Connection: Real-time formula retrieval from Dataverse
- Entity Metadata: Complete entity and attribute information
- Formula Analysis: Read-only access with proper error handling
๐ฏ Use Cases
For Dataverse Developers
- Formula Understanding: Quickly comprehend complex calculated field logic
- Documentation: Generate readable documentation of business rules
- Troubleshooting: Debug formula issues with clear structure visualization
- Code Review: Review formula implementations across environments
For Business Analysts
- Logic Validation: Verify business rules implementation without technical XAML knowledge
- Requirements Mapping: Ensure formulas match business requirements
- Impact Analysis: Understand dependencies and referenced fields
for Solution Architects
- Environment Analysis: Audit formulas across multiple environments
- Complexity Assessment: Identify overly complex formulas for refactoring
- Migration Planning: Understand formula dependencies for solution deployment
๐ค Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Guidelines
- Follow established architecture patterns
- Maintain comprehensive unit test coverage
- Implement accessibility features (WCAG 2.2 compliance)
- Use proper error handling and logging
- Document public APIs with XML comments
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐โโ๏ธ Support & Community
- Issues: Report bugs and request features via GitHub Issues
- Documentation: Comprehensive guides available in the Wiki
- XrmToolBox Community: Join discussions in the XrmToolBox Community
- Power Platform Community: Connect with other developers in the Power Platform Community
๐ Acknowledgments
- XrmToolBox Team: For the excellent plugin framework
- Microsoft Power Platform Team: For comprehensive Dataverse APIs
- Power Platform Community: For feedback and feature requests
โ Formula Insights - Making Dataverse Formulas Human-Readable
Last Updated: August 29, 2025
Learn more about Target Frameworks and .NET Standard.
-
- XrmToolBoxPackage (>= 1.2022.10.58)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 1.0.2: Improved icon configuration and package metadata. Version 1.0.1: Added plugin icon and improved package presentation. Initial release featuring calculated field analysis, rollup field visualization, Power Fx formula parsing, user-friendly XAML display, and advanced conditional logic parsing (IF-THEN-ELSE support).