FormulaInsights.XrmToolBox 1.0.2

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FormulaInsights.XrmToolBox" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FormulaInsights.XrmToolBox" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="FormulaInsights.XrmToolBox" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FormulaInsights.XrmToolBox --version 1.0.2
                    
#r "nuget: FormulaInsights.XrmToolBox, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FormulaInsights.XrmToolBox@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FormulaInsights.XrmToolBox&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=FormulaInsights.XrmToolBox&version=1.0.2
                    
Install as a Cake Tool

Formula Insights - XrmToolBox Plugin

XrmToolBox Plugin .NET Framework Dataverse

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

  1. Open XrmToolBox
  2. Go to Configuration โ†’ Manage Plugins
  3. Search for "Formula Insights"
  4. Click Install
  5. Restart XrmToolBox
Option 2: Manual Installation
  1. Download the latest release from Releases
  2. Extract the plugin files
  3. Copy all files to your XrmToolBox plugins folder:
    %APPDATA%\MscrmTools\XrmToolBox\Plugins\
    
  4. Restart XrmToolBox
  5. Find "Formula Insights" in the Tools menu

Quick Start

  1. Connect to your Dataverse environment
  2. Select Entity from the dropdown to filter formulas
  3. Choose Formula from the list to analyze
  4. 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

  1. Follow established architecture patterns
  2. Maintain comprehensive unit test coverage
  3. Implement accessibility features (WCAG 2.2 compliance)
  4. Use proper error handling and logging
  5. Document public APIs with XML comments

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™‹โ€โ™‚๏ธ Support & 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

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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).