Hexagon Geospatial
MENU

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 
Reply
Contributor
Posts: 68
Registered: ‎07-07-2016
Accepted Solution

How to get selected items from form table?

[ Edited ]

Hi,

I have a form containing table. Table has Selection mode set to "multiple". I've checked some table rows and now I'm tryinig to get ids of those selected items. How can I do it?

In documentation I've found such description:

If selectionmode="multiple", then saveinsession will store a coma separated string of the ID values; otherwise, the actual ID value will be persisted in the SEC_SESSION table. 

But nothing happens neither after selecting items nor after submiting buttons.

 

<Form name="WyborCieku2" editable="true">
<FormTab name="NewTabPage1" editable="true" visible="true">
<FormGroup name="NewGroup1" editable="true" visible="true">
<FormField name="FilterField" editable="true" visible="true" datatype="string" required="false" persisted="false" saveinsession="false" type="textfield" override="false">
<FormAction name="NewAction1" label="Filtruj" editable="true" visible="true" />
</FormField>
<FormTable name="rzekiTable" editable="true" visible="true" datatype="guid" lov="SQL[select id, nazwa_rzeki from mphp.rzeki_r where upper(nazwa_rzeki) like '%' || upper({Form.FilterField}) || '%']" required="false" persisted="true" saveinsession="true" expand="true" override="false" idfield="id" selectionmode="multiple" rowcount="15">
<FormTableField name="id" datatype="string" />
<FormTableField name="nazwa_rzeki" datatype="string" />
</FormTable>
</FormGroup>
</FormTab>
<FormAction name="anuluj" label="Anuluj" editable="true" visible="true" />
<FormAction name="wybierz" label="Wybierz" editable="true" visible="true" action="SCRIPT[alert('!')]" submit="true" />
</Form>

Staff
Posts: 646
Registered: ‎10-18-2015

Re: How to get selected items from form table?

If you want to store it in the session you have to use either action="save" or scripting action to post the form (Form/Save or captureGeometry), together with saveinsession property.

If you want to access the selected values on the client side directly you just have to use something like

 

IG.getItemById('FormTableName').getValue()

It will return a JS array of values.

 

Stefano

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

Re: How to get selected items from form table?

Thanks for the solution!

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