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
Highlighted
Contributor
Posts: 41
Registered: ‎05-30-2016

Double Click in Geomedia Smart Client 15.3 enters double values in Database connection table

In our GMSC 15.3 Application we have workflow save actions, which beside saving a new feature are also entering information into a connection table. Also there are workflow actions espectially designed to save connections between features in connection tables.

 

We have triggers on these connection tables which should prevent that the same connection can be entered. 

 

An example of one of the triggeres is below.

 

If the user is clicking with a doubble click, or as the application interprets it, two fast click after each other. The trigger is not catching it and we have twice the same connection information inside the connection table.

 

 

 

Trigger code: (explenation 'Retras' is a status flag, if set to 0 it means  the status is activ, 1 is status deleted)

 

CREATE OR REPLACE TRIGGER D_IGS_CONTAINMENT_CHECK_UNIQUE
BEFORE INSERT OR UPDATE ON D_IGS_CONTAINMENT
FOR EACH ROW
DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
UNIQUE_KEY INTEGER;
BEGIN
IF (INSERTING AND :NEW.RETRAS = 0) OR
(UPDATING AND :NEW.RETRAS = 0 AND Smiley SurprisedLD.RETRAS = 1) THEN
SELECT COUNT(*)
INTO UNIQUE_KEY
FROM D_IGS_CONTAINMENT IGS
WHERE IGS.XDM_FNO1 = :NEW.XDM_FNO1
AND IGS.XDM_FID1 = :NEW.XDM_FID1
AND IGS.XDM_FNO2 = :NEW.XDM_FNO2
AND IGS.XDM_FID2 = :NEW.XDM_FID2
AND IGS.RETRAS = :NEW.RETRAS;
IF UNIQUE_KEY > 0 THEN
:NEW.RETRAS := 1;
RAISE_APPLICATION_ERROR(-20000, 'LOGIC KEY ALREADY EXIST');
END IF;
END IF;

END D_IGS_CONTAINMENT_CHECK_UNIQUE;

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