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
BFL
Occasional Contributor
Posts: 13
Registered: ‎12-12-2016
Accepted Solution

FormAction (row): refresh page after action or unmark past row before and run action everytime

Hi everyone,

 

I have a workflow list with an FormAction of type="row". If I click on this action the row should be marked and the map should be centered on this feature.

 

This works fine - but only the first time.

 

On the second time, when I try to cick on the action in an other row only the new row is marked. But the old row did not get unmarked and also the map get not centered on the new point.

 

If I refresh the page by the refresh button or on the workflownode, I get the list unmarked and for the next click on the action it works (but also only on the first time).

 

So I like to find a function that I can refresh the list after the click on action. Or better, a function before the current action that unmark the past row and let the action everytime works.

 

At the moment my row action looks like:

 

action="SCRIPT[
  IG.trigger(
   {
    triggerNames:['copyFeaturesTrigger'],
    urlParams:{PoiId:{ROW.ID}}
   }
  ).done(
   function(){
    IG.setMapScale(2500);
    IG.setMapCenter({ROW.X},{ROW.Y})
   }
  )
 ]"

 

Does someone has an idea?

 

Thanks,

Bernhard

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

Re: FormAction (row): refresh page after action or unmark past row before and run action everytime

Hi Bernhard,

 

you did not mention which version of GMSC you are using. I guess it is 15 because on 16 the behavior is different (the row should not stay marked). 

I guess in your trigger the current feature is set somehow in the session. What you can do is to clear the selected feature using IG.clearSelectedElements() and then do the rest.

If not enough you may try to reload the list using IG.list.refreshList().

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
BFL
Occasional Contributor
Posts: 13
Registered: ‎12-12-2016

Re: FormAction (row): refresh page after action or unmark past row before and run action everytime

Hi Stefano,

 

I use GMSC 2015 (sorry that I forget to mention it).

 

As far as I know this trigger came from the standard and my log show for this:

Spoiler
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.Execute(); 1Smiley Tonguearameters ok.
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.Execute(); 2a:Connected to OrigDBSmiley TongueOI
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.Execute(); 2b:Connected to TargetDB:HIGHLIGHT
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.selectFeatures(); SQL statement:select PK, SDO_UTIL.TO_WKTGEOMETRY(SHAPE) from POI where PK in ('{D2E99B44-3187-4474-ACCD-BBE81866C527}')
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.Execute(); 3:Features selected from OrigDB.
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.deleteAllFeaturesOfSession(); deleting complete session: delete from HIGHLIGHT where SESSIONID = '8158e56f-586f-4a17-b777-b11cfe2c3c7f'
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.deleteAllFeaturesOfSession(); deleting existing features: delete from HIGHLIGHT where SESSIONID = '8158e56f-586f-4a17-b777-b11cfe2c3c7f' and ORIG_ID in ('{D2E99B44-3187-4474-ACCD-BBE81866C527}')
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.Execute(); 4Smiley Very Happyeleted required data.
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.insertRowsIntoTarget(); Insert row 0:insert into HIGHLIGHT (ID, BEZEICHNUNG, SESSIONID, SDOGEOMETRY, ORIG_ID, ORIG_TABELLE) values (ZIELTABELLE_SEQ.NEXTVAL, '', '8158e56f-586f-4a17-b777-b11cfe2c3c7f', SDO_GEOMETRY('POINT (353840.43902587896 5634267.415039061)', NULL), '{D2E99B44-3187-4474-ACCD-BBE81866C527}', 'POI')
18.01.2017 15:54:56 DEBUG - CopyFeatureTrigger.Execute(); 5:Inserted copies.
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.Execute(); 1Smiley Tonguearameters ok.
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.Execute(); 2a:Connected to OrigDBSmiley TongueOI
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.Execute(); 2b:Connected to TargetDB:HIGHLIGHT
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.selectFeatures(); SQL statement:select PK, SDO_UTIL.TO_WKTGEOMETRY(SHAPE) from POI where PK in ('{8315215B-62E6-4B4E-83DD-89FD721C97C3}')
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.Execute(); 3:Features selected from OrigDB.
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.deleteAllFeaturesOfSession(); deleting complete session: delete from HIGHLIGHT where SESSIONID = '8158e56f-586f-4a17-b777-b11cfe2c3c7f'
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.deleteAllFeaturesOfSession(); deleting existing features: delete from HIGHLIGHT where SESSIONID = '8158e56f-586f-4a17-b777-b11cfe2c3c7f' and ORIG_ID in ('{8315215B-62E6-4B4E-83DD-89FD721C97C3}')
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.Execute(); 4Smiley Very Happyeleted required data.
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.insertRowsIntoTarget(); Insert row 0:insert into HIGHLIGHT (ID, BEZEICHNUNG, SESSIONID, SDOGEOMETRY, ORIG_ID, ORIG_TABELLE) values (ZIELTABELLE_SEQ.NEXTVAL, '', '8158e56f-586f-4a17-b777-b11cfe2c3c7f', SDO_GEOMETRY('POINT (368616.0 5665070.0)', NULL), '{8315215B-62E6-4B4E-83DD-89FD721C97C3}', 'POI')
18.01.2017 15:55:10 DEBUG - CopyFeatureTrigger.Execute(); 5:Inserted copies.

As far as I can test, the table HIGHLIGHT has the correct values - but I get no change on this features on map, no change of center location and furthermore the new line is selected.

 

Your suggestion that the current feature is set somehow in the session is in my case not true.

 

IG.clearSelectedElements() help only that everything work as it should, but did not unmark the selected row.

IG.list.refreshList() only unmark the selected row - but after the first time the mark and center of map did not work.

 

So I tried to use both and it works. Means that I start with IG.clearSelectedElements() before my current code and I finish it with IG.list.refreshList().

 

Thank you Stefano

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