I need to create a workflow for Collector in which different users work with the same map but when they open it they only see the content that is relevant to them.
I thought about incorporating a username field into the table and then using it as a #filter.
It is possible to generate this filter (possibly through AGOL Assistant) to take into account this dynamic value?
Thanks.
Definitely needed I would say! We are also trying to find a way to share the same map with users but each should only see the features of their administrative area.
Hello,
I have the same problem with Survey123 and other applications.
In my case, I want each user to have access to their data and team leaders to access data only from their teams.
And eventually a team leader can create a record that is visible to one of his operators, without having to use that user's account.
This can be done but you need to create several views and several apps.
This is really urgent for those who develop large-scale projects.
There are many institutions and companies that need this resource...
It's still dark here...
Compliments
I will chime in here as well, I would love to be able to filter a web map based on username.
This would be very helpful for us as well.
We have been able to do this in ArcGIS Field maps but the user does need to go in and set the filter each time they open the map. Would be nice to be able to do it programmatically for them so they don't have access to items assigned to others.
This is possible using the editor-based access setting as suggested by @DerekLaw :
You can only use this on Feature services, but disabling all options under 'Operations Allowed' will make it a pseudo-map service.
Of course you need to set (and sync) the created_user field, but this is easy if the data is in your own database or if you have access to Enterprise's Data Store in case you're using an Enterprise-based hosted service.
In our case we use a 'district' table with a field 'PortalUser':
A trigger on this table pushes any update or change to the created_user field of the dataset we're using for the service(s):
create or replace TRIGGER "WATERSCHAP"."WF_GEO_BOP2015_AANNEMER_BFIU"
BEFORE INSERT OR UPDATE ON WATERSCHAP.WF_GEO_BOP2015_AANNEMER
-----------------------------------------------------------------
--
-- overwrite the create_user so we can user owner-based access in the service
--
REFERENCING OLD AS old NEW AS new
FOR EACH ROW
DECLARE
begin
--
-- catch for old versions arcgis server
--
if
:new.OBJECTID < 0
then
null;
else
--
-- update created_user field
--
update
WATERSCHAP.WF_GEO_BOP2015 bop
set
bop.CREATED_USER = :new.PORTALACCOUNT
where
nvl(bop.RAYON,'empty') = nvl(:new.RAYON,'dummy');
--
end if;
--
end;
We use this in Oracle, but you can use the same thing for the PostgreSQL db of the Data Store.
Work nicely, really; any change is directly visible in the webmap. The update trigger is trivial; 0.5s for 10k rows.