Dynamic Attributes - Step-by-Step Tutorial
This hands-on tutorial will guide you through creating your first dynamic attributes in 3PL Dynamics. We'll start with simple examples and progress to more advanced scenarios.
🎯 Tutorial Objectives
By the end of this tutorial, you'll be able to:
- Create basic field-based dynamic attributes
- Set up calculated attributes using function sets
- Configure FlowField-based attributes
- Apply formatting and styling
- Add attributes to page layouts
- Monitor and optimize performance
📚 Prerequisites
- Access to 3PL Dynamics with appropriate permissions
- Basic understanding of Business Central navigation
- Familiarity with the data you want to extend
🚀 Tutorial 1: Creating a Simple Field-Based Attribute
Let's start by creating a dynamic attribute that displays an existing field with custom formatting.
Scenario: Display Item Unit Cost with Custom Formatting
Goal: Show the unit cost of items with currency formatting and custom styling.
Step 1: Open Dynamic Attributes
- Press Alt+Q to open the search
- Type "Dynamic Attributes" and press Enter
- Click New to create a new attribute
Step 2: Basic Configuration
- Table No.: Enter
27
(Item table) - Code: Enter
UNIT_COST_FORMATTED
- Description: Enter
Unit Cost (Formatted)
- Value Type: Select
Decimal
Step 3: Link to Field
- Field No.: Enter
22
(Unit Cost field) - Notice that Is FlowField is automatically set to
false
Step 4: Configure Formatting
- Decimals: Enter
0:2
(0 minimum, 2 maximum decimal places) - Standard Format: Select
No Thousand Separator
Step 5: Save and Test
- Click OK to save
- Navigate to an Item List page
- Check if your attribute appears in the available fields
🧮 Tutorial 2: Creating a Calculated Attribute
Now let's create an attribute that calculates a value using a simple formula.
Scenario: Calculate Item Profit Margin Percentage
Goal: Show profit margin as a percentage based on unit cost and unit price.
Step 1: Create the Attribute
- Open Dynamic Attributes
- Click New
- Table No.:
27
(Item table) - Code:
PROFIT_MARGIN_PCT
- Description:
Profit Margin %
- Value Type:
Decimal
Step 2: Set Up Function Set
- Value Function Set ID: Click the lookup (you'll need to create a function set)
- Create a simple calculation:
(Unit Price - Unit Cost) / Unit Price * 100
- Save the function set and note its ID
- Enter the function set ID in the Value Function Set ID field
Step 3: Configure Display
- Decimals: Enter
0:1
(show as percentage with 1 decimal) - Standard Format: Leave as default
Step 4: Add Performance Monitoring
- Track Performance Statistics: Select
Yes (Session)
- Slow Calculation Threshold: Enter
100
(100 milliseconds)
📊 Tutorial 3: Creating a FlowField Attribute
Let's create an attribute that aggregates data from related tables.
Scenario: Show Total Quantity on Sales Orders
Goal: Display total quantity for all lines on a sales order.
Step 1: Create the Attribute
- Table No.:
36
(Sales Header table) - Code:
TOTAL_QUANTITY
- Description:
Total Order Quantity
- Value Type:
Decimal
Step 2: Configure FlowField
- Field No.: Select a FlowField that sums quantities from Sales Lines
- Is FlowField: Will be automatically set to
true
- Calculate Field: Set to
true
Step 3: Set FlowFilter (Optional)
You can filter which lines to include:
- FlowFilter Values: Enter
Type=Item
(only include item lines)
Step 4: Configure Caching
- Buffer Recalculation Interval: Enter
00:01:00
(1 minute) - Entry Recalculation Interval: Enter
00:05:00
(5 minutes)
🎨 Tutorial 4: Adding Conditional Styling
Let's enhance our profit margin attribute with color coding.
Scenario: Color-Code Profit Margins
Goal: Show profit margins in green (good), yellow (average), or red (poor).
Step 1: Edit Existing Attribute
- Open your
PROFIT_MARGIN_PCT
attribute - Go to the Style Function Set ID field
Step 2: Create Style Function Set
Create a function set that returns style names based on value:
IF Profit Margin >= 20 THEN 'Favorable'
ELSE IF Profit Margin >= 10 THEN 'Ambiguous'
ELSE 'Unfavorable'
Step 3: Apply the Style
- Enter the style function set ID
- Save the attribute
📋 Tutorial 5: Setting Up Layouts
Now let's control where our attributes appear on pages.
Step 1: Create an Attribute Layout
- Search for "Dynamic Attribute Layouts"
- Click New
- Table No.:
27
(Item table) - Code:
ITEM_DASHBOARD
- Description:
Item Dashboard Layout
Step 2: Add Layout Lines
From the layout card, click Lines
Add a new line for each attribute:
- Dynamic Attribute Code:
UNIT_COST_FORMATTED
- Display Order:
10
- Value Type:
Decimal
- Dynamic Attribute Code:
Add another line:
- Dynamic Attribute Code:
PROFIT_MARGIN_PCT
- Display Order:
20
- Value Type:
Decimal
- Dynamic Attribute Code:
Step 3: Associate with Page
- Search for "Dynamic Page Layouts"
- Find or create entry for Item table
- Set Dynamic Attr. Layout Code to
ITEM_DASHBOARD
🔍 Tutorial 6: Testing and Validation
Let's verify our attributes are working correctly.
Step 1: View on Item List
- Navigate to the Item List page
- Look for your dynamic attributes in the field list
- Add them to your view if not already visible
Step 2: Test Calculations
- Select different items
- Verify the profit margin calculations are correct
- Check that styling is applied appropriately
Step 3: Check Performance
- Return to your Dynamic Attributes
- Open the
PROFIT_MARGIN_PCT
attribute - Check the performance fields:
- No. of Calculations
- Total Elapsed Calc. Time
- Max. Elapsed Calc. Time
🏢 Tutorial 7: Advanced Scenario - Warehouse KPIs
Let's create a more complex example for warehouse management.
Scenario: Location Utilization Dashboard
Goal: Show utilization percentage and status for warehouse locations.
Step 1: Create Utilization Percentage
- Table No.: Location table
- Code:
UTILIZATION_PCT
- Description:
Utilization %
- Value Type:
Decimal
- Create function set to calculate:
(Used Capacity / Total Capacity) * 100
Step 2: Create Status Indicator
- Code:
UTILIZATION_STATUS
- Description:
Utilization Status
- Value Type:
Text
- Create function set that returns:
- "Optimal" for 70-85% utilization
- "Underutilized" for <70%
- "Overcrowded" for >85%
Step 3: Add Visual Indicators
- Create style function sets for both attributes
- Use traffic light colors (green, yellow, red)
Step 4: Create Comprehensive Layout
- Create layout:
WAREHOUSE_KPI
- Add all warehouse-related attributes
- Order them logically
🚨 Common Pitfalls and Solutions
Issue: Attribute Not Showing
Solutions:
- Check if attribute is blocked
- Verify table number matches page
- Ensure layout is properly configured
- Check user permissions
Issue: Slow Performance
Solutions:
- Enable performance tracking
- Increase caching intervals
- Simplify function set logic
- Add database indexes if needed
Issue: Incorrect Calculations**
Solutions:
- Test function sets independently
- Check FlowFilter syntax
- Verify field mappings
- Review data types
Issue: Styling Not Applied**
Solutions:
- Verify style function set returns valid style names
- Check conditional logic
- Test with different data values
- Review style definitions
🎓 Next Steps
Congratulations! You've learned the fundamentals of Dynamic Attributes. Here's how to continue your journey:
Immediate Actions
- Practice: Create attributes for your own business scenarios
- Experiment: Try different value types and formatting options
- Monitor: Set up performance tracking for production use
Advanced Topics
- Complex Function Sets: Learn advanced calculation techniques
- Multi-Table Attributes: Work with related table data
- Custom Page Integration: Add attributes to custom pages
- API Integration: Use attributes in web services
Best Practices
- Start Simple: Begin with basic field-based attributes
- Plan Performance: Consider caching and calculation complexity
- Document Logic: Keep clear notes on business rules
- User Training: Help your team understand new functionality
Resources
- Boltrics Academy: Advanced training courses
- Support Portal: Technical assistance
- User Community: Share experiences and tips
- Documentation: Detailed technical references
📝 Tutorial Checklist
Mark off each tutorial as you complete it:
- [ ] Tutorial 1: Field-Based Attribute
- [ ] Tutorial 2: Calculated Attribute
- [ ] Tutorial 3: FlowField Attribute
- [ ] Tutorial 4: Conditional Styling
- [ ] Tutorial 5: Layout Configuration
- [ ] Tutorial 6: Testing & Validation
- [ ] Tutorial 7: Advanced Warehouse KPIs
Practice Exercises
Try creating these on your own:
- [ ] Customer aging days calculation
- [ ] Vendor payment terms status
- [ ] Item stock level indicators
- [ ] Order fulfillment percentage
- [ ] Route efficiency metrics
Remember: Dynamic Attributes are powerful tools that grow with your expertise. Start with simple scenarios and gradually tackle more complex business requirements as you become comfortable with the functionality.