Let me provide a comprehensive solution that addresses all three technical aspects of your mobile filter synchronization issue:
Global Filter Event Binding Fix:
The problem is that Snowflake’s mobile app uses an asynchronous event model that differs from web desktop. Your current filter code needs to be updated for mobile compatibility:
filter.onChange = function(value) {
dashboard.applyFilters({
waitForAll: true,
includeCalculated: true
}).then(function() {
dashboard.refreshWidgets();
});
};
Key changes:
- Use
applyFilters() instead of refresh() - this properly queues filter changes for mobile’s async rendering
- Set
waitForAll: true to ensure all widgets (including calculated ones) receive the filter event before refresh
- Set
includeCalculated: true to explicitly notify widgets with calculated fields
- Chain
refreshWidgets() in the promise callback to ensure proper execution order
The mobile app’s event queue can process filter changes out of order, causing some widgets to miss the event entirely. The promise-based approach guarantees synchronous execution.
Widget Configuration for Mobile:
For each of your six widgets, update their mobile-specific settings:
-
Edit each widget → Mobile tab (if not visible, enable it in Dashboard Settings → Mobile Configuration → Show mobile-specific options)
-
For the conversion rate and win rate widgets specifically:
- Set ‘Filter binding mode’ to ‘Direct parameter binding’
- Add explicit parameter mappings:
- dateRangeFilter → @dateRange
- regionFilter → @region
-
In the Data Binding tab, modify the calculated field queries to explicitly reference filter parameters:
SELECT
SUM(conversions) / SUM(opportunities) as conversion_rate
FROM sales_data
WHERE date BETWEEN @dateRange.start AND @dateRange.end
AND region = @region
This explicit binding ensures mobile widgets don’t rely solely on dashboard-level filter propagation, which can be unreliable for calculated fields.
- For ALL six widgets, enable these mobile-specific settings:
- Data Binding → Advanced → ‘Re-execute query on filter change’: Enabled
- Mobile Rendering → ‘Invalidate cache on filter event’: Enabled
- Performance → ‘Defer rendering until filters applied’: Enabled
Mobile Dashboard Preview Mode Considerations:
The mobile preview mode has several quirks you need to account for:
-
Cache Management:
- Dashboard Settings → Mobile Configuration → Cache Strategy
- Change from ‘Aggressive (default)’ to ‘Minimal’
- Set ‘Cache invalidation triggers’ to include ‘Filter changes’, ‘Widget dependencies’
- This prevents the mobile app from serving cached calculated values
-
Widget Dependency Declaration:
Since your conversion rate and win rate widgets depend on data from other widgets, declare these dependencies explicitly:
- Edit conversion_rate widget → Dependencies tab
- Add: revenue_widget, pipeline_widget as dependencies
- Set dependency refresh order: ‘Parent widgets first’
- This ensures base data widgets refresh before calculated widgets
-
Mobile Preview Testing:
Don’t rely solely on mobile preview mode for testing - it doesn’t perfectly replicate the native app behavior:
- Test on actual iOS/Android devices using the Snowflake mobile app
- Use the mobile app’s built-in debugger: Settings → Developer Options → Enable filter event logging
- Check the console logs for filter event propagation timing
-
Filter Timing Configuration:
- Dashboard Settings → Filters → Advanced
- Set ‘Apply mode’ to ‘On change’ for mobile (not ‘On apply button’)
- Enable ‘Debounce filter changes’ with 500ms delay to prevent excessive refreshes on slow mobile connections
- Set ‘Filter application strategy’ to ‘Sequential’ instead of ‘Parallel’ for mobile to ensure proper ordering
Debugging Steps:
If issues persist after the above changes:
-
Enable mobile debug mode:
- Add
?mobileDebug=true to your dashboard URL when testing in mobile preview
- This shows filter event propagation in the browser console
-
Check widget refresh order:
- Dashboard Actions → View Refresh Log
- Look for timing differences between working widgets (revenue, pipeline) and problematic ones (conversion, win rate)
- If calculated widgets refresh BEFORE their source widgets, that’s your problem
-
Verify filter parameter passing:
- Edit problematic widget → Data Binding → View SQL
- Check if filter parameters are being substituted correctly
- On mobile, sometimes parameter substitution fails silently, leaving widgets with no WHERE clause
-
Test filter event propagation:
- Add this to your dashboard’s custom JavaScript:
dashboard.on('filterChange', function(event) {
console.log('Filter changed:', event.filterName, event.value);
console.log('Affected widgets:', event.affectedWidgets);
});
- If affectedWidgets doesn’t include all six widgets, the event binding is incomplete
Root Cause:
The core issue is that Snowflake 8.0’s mobile app uses a different widget refresh pipeline than the desktop version. On desktop, calculated widgets automatically subscribe to dashboard filter events and refresh their calculations. On mobile, this subscription is lazy-loaded to conserve battery and bandwidth, which can cause calculated widgets to miss filter events if they haven’t been explicitly bound to filter parameters. The solution requires both updating the filter event code to use mobile-compatible async patterns AND explicitly declaring filter dependencies at the widget level.