Hexagon Geospatial

Support GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Posts: 68
Registered: ‎07-07-2016
Accepted Solution

Display features of current user only

I have a feature with following attributes:






Is it possible to display on map, only those records that has USER_NAME value equals to currently logged user name?

Posts: 646
Registered: ‎10-18-2015

Re: Display features of current user only

it looks like you have already requested this:




you have to use a session filter.



Stefano Turcato
Presale Engineer
Hexagon Geospatial
Posts: 68
Registered: ‎07-07-2016

Re: Display features of current user only

You rightSmiley Wink


Session filter is exactly what I need.

Posts: 68
Registered: ‎07-07-2016

Re: Display features of current user only

I've configurated session filter but...when I set session filter for one feature, It's set for all features.

Can I set session filter for every feature individually?

Occasional Contributor
Posts: 13
Registered: ‎01-31-2018

Re: Display features of current user only

You could do this by defining a pool of session filters and relating the appropriate session filter to each feature.

Another way would be to use EntitySql on the features ... but this is more a hack and please use this at your own risk (I managed to get this working with GMSC 16.1):

With EntitySql you are able to extend the datasource of your feature. You could join other tables or views to the feature's base table and use their columns as attributes available to the tooltip definiton of the feature. You can set EntitySql queries in the "Additional settings" tab of the Feature-Worklow in the GMSC Admin Web.

However, in the EntitySql query you define, session placeholders (e.g. {SESSION.UserName}) will not be replaced by their concrete values. So how could you get your session values into the query sent to the database? By using query parameters defined in the session filter instead of placeholders.

In your example, to get all geometries related to the current user, you define


  1. A SessionFilter containing the {SESSION.UserName} placeholder (you might use other placeholders as well)
  2. Make sure, the UserName placeholder does not affect the query output (keeping it neutral, like using it as NOT ({SESSION.UserName} = 'undefined') or similar). This will apply the query parameter "UserName" to the DB command composed by the Maps-Application
  3. Use the so-defined query parameter (:USERNAME with a Oracle RDBMS, @UserName in MS Sql) in the EntitySql field of GMSC (Ora example): SELECT -feature_cols- FROM -feature_table- WHERE user_name=:UserName

The Maps-Application of GMSC will then use the so defined EntitySql query as datasource (in a inner select) instead of the feature's table when quering for geometries.

I think, even the :RANGE parameter could be used to filter geometries using a spatial operator to restrict the output set in the data source of the complete query - this might be an opportunity not to inspect all rows in the feature's table, but I have not tested this. At least a query optimizer hint could be defined in the inner select by using the EntitySql option ...

By the way, setting the log4net log-level to DEBUG in the web.config file of the Map-Application helps to inspect the queries executed against the underlying db.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.