I would like to display only records that have an associated portal user by default when an app is opened. This would be analogous to the functionality of Workforce as it show only the work orders that are assigned to a user. Has anyone had experience doing this?
I assume you want this to happen when the user loads the application.. Sounds like you'll need a custom query task that injects the user details in the where statement for each layer.
I'm manipulating the layers a bit when loading the application but it's a very custom solution. I manage that code at the jimu.js/mapmanager.js file just when it loads the layers.
You can iterate them and apply the filter with the FilterManager object after grabbing the user details (which should be available once you limit the access to the resource)
Shay.
Thanks for the reply. Thinking about making this a configurable widget ...
Hi Keith,
I'm interesting about your configurable widget or any solution to filer layer by arcgis portal username.