Hexagon Geospatial
MENU

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 
Reply
Staff
Posts: 84
Registered: ‎01-13-2017

How to get the IDs of all selected features?

[ Edited ]

Hi Team,

 

I am using GMSC v16.02. I want get the list of IDs of the selected features.

 

I tried the following but it didnt work.

<FormField name="SelectedElements" label="Selected elems" type="textfield" datatype="string" persisted="false" defaultvalue="SCRIPT[IG.getSelectedElements()]" />

How can I get the IDs of all selected features? Is there any other method? Please suggest.

 

 

Regards,

Shashank

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: How to get the IDs of all selected features?

Hi, 

 

I think this thread is relevant to you:

http://community.hexagongeospatial.com/t5/Support-GeoMedia-Smart-Client/Creating-data-from-map-selec...

 

The idea is that in order to store a list of selected objects you need an array, so a formtable.

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Staff
Posts: 84
Registered: ‎01-13-2017

Re: How to get the IDs of all selected features?

Hi,

 

Thanks a lot. Actually my client wants to select the multiple features in a layer and delete them together. 

 

Now I achieved it. I created a formfield with  persisted="false" and store the IDs of selected features by running a custom scrip on the form:ready event.

var selFeaturesID = IG.getSelectedElements();
form.getItemById('SelectedFeatures').setValue(selFeaturesID);

Then I used a SQL trigger to delete those records from the table which are in selected IDs.

 

Regards,

Shashank Mathur

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