Filter Attachments

708
3
02-23-2017 07:44 AM
Highlighted
Occasional Contributor

I have a point feature class with several photo attachments.  There are situations where I may want to filter which photos a user can/should be able to view.  For instance, A user may only want to view "Finish Phase" photos and not "Construction Phase" photos.  I have thought about adding a field to the attachment table and populating with the phase type.  However, I don't know if there's a way to apply this filter, or definition query, to the end user.  All my data and photos are stored in SQLServer.

Any ideas how I might be able to accomplish this?

-Andrew

Reply
0 Kudos
3 Replies
Highlighted
Regular Contributor II

I see no reason why it would not be doable?  You are able to get users name / roles  and if you have a foreign key within the photo table a  filterable relationship could be established or handled by code.  

This looked promising ... How To: Get the current user name and roles using a server object extension 

Reply
0 Kudos
Highlighted
Occasional Contributor III

Did you ever figure out how to do this?  I have the same (or roughly the same) use-case. I have a feature with many photos and in the feature's popup i want to display only the pictures with the name 'before' and 'after' while not showing any others.

Reply
0 Kudos
Highlighted
Occasional Contributor

Nope, never figured it out.  It would be nice if this was functionality that was added in at some point!

Reply
0 Kudos