Accessing Connected Data
Techniques for accessing and manipulating data from connected blocks
Once blocks are connected, you can access data from source blocks in destination blocks using connection tags and various data access techniques.
Basic Data Access
The simplest way to access data is through direct references using connection tags:
Advanced Data Access Techniques
Array Access
You can access array elements using square bracket notation:
Object Property Access
Access object properties using dot notation:
Dynamic References
Connection references are evaluated at runtime, allowing for dynamic data flow through your workflow:
Data Transformation
Using Function Blocks
Function blocks are the most powerful way to transform data between connections:
String Interpolation
You can combine connection tags with static text:
Conditional Content
In Function blocks, you can create conditional content based on connected data:
Handling Missing Data
It's important to handle cases where connected data might be missing or null:
Always validate connected data before using it, especially when accessing nested properties or array elements.
Default Values
In Function blocks, you can provide default values for missing data:
Conditional Checks
Check if data exists before accessing nested properties:
Optional Chaining
In Function blocks, use optional chaining to safely access nested properties:
Debugging Connection Data
When troubleshooting connection issues, these techniques can help:
- Log Data: In Function blocks, use
console.log()
to inspect connected data - Return Full Objects: Return the full input object to see all available data
- Check Types: Verify the data types of connected values
- Validate Paths: Ensure you're using the correct path to access nested data