I want to filter features based on the user that is logged in. This should be invisible to the user and require no user interaction or on screen widget. Similar questions have been asked before but I haven't had any success trying to implement this.
Run Filter in background executing programmatically an expession
Filtering a webmap layer within a web appbuilder application on startup
The answer seems to be to use the filter manager class: FilterManager class—ArcGIS Web AppBuilder (Developer Edition) | ArcGIS for Developers
, and to use this method applyWidgetFilter (layerId, widgetId, expression) somewhere in the MapManager.js file
I've been struggling to apply this however and haven't been able to get it to work. Has anyone any experience here that they could guide me?