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
Contributor
Posts: 36
Registered: ‎02-19-2019
Accepted Solution

Delete a row from List

Dear Community ,

 

I'm a new here. I have a list with action delete button. I wrote sql code on Value-Editor: Action

DELETE FROM View_DeleteAsset WHERE ASSET_PK = {ROW.ASSET_PK}

but I'm getting error when I click on workflow save. 

"The value 'DELETE FROM View_DeleteAsset WHERE ASSET_PK = ' + {ROW.ASSET_PK}' is not valid according to any of the memberTypes of the union."

 

Anyone help please ?

Staff
Posts: 568
Registered: ‎11-12-2015

Re: Delete a row from List

Hi Liton,

 

Perhaps you could call an Action SQLTrigger from your row action button?

From action button eg.

IG.trigger({triggerNames:'SQLTrigger1'})

 

For the Action SQLTrigger1 you would place your SQL statement in the Value Editor: Sql

eg.

DELETE FROM View_DeleteAsset WHERE ASSET_PK = {ROW.ASSET_PK}

 

HTH

Contributor
Posts: 36
Registered: ‎02-19-2019

Re: Delete a row from List

I'm getting this error

 

	Unclosed quotation mark after the character string 'DELETE FROM View_DeleteAsset WHERE ASSET_PK = @0_'.
Contributor
Posts: 36
Registered: ‎02-19-2019

Delete row from List

Dear Community ,

 

I'm a new here. I'm trying to delete a record from List (attached). I'm following the way , 

I'm calling an Action SQLTrigger from your row action button

From action button eg.

IG.trigger({triggerNames:'SQLTrigger1'})

 

For the Action SQLTrigger1 I place my SQL statement in the Value Editor: Sql

 

DELETE FROM View_DeleteAsset WHERE ASSET_PK = {ROW.ASSET_PK}

 

I'm getting this error 

 

Unclosed quotation mark after the character string ''DELETE FROM View_DeleteAsset WHERE ASSET_PK =' + @0_'.

{ROW.ASSET_PK} not passig the value I think. 

 

Anyone help please to resolve this issue? Thanks !

 

Highlighted
Staff
Posts: 1,015
Registered: ‎10-19-2015

Re: Delete row from List

hi,

 

can you please check on the server side if the workflow settings have been correctly configured by the editor?

 

It is within [GMSC Installation folder]\Workfows\Workflowsettings\

 

Thanks,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 36
Registered: ‎02-19-2019

Re: Delete row from List

Hi 

Everythings seems okay . Please see the screenshot of folder but still getting error. 

delete a record.png

Staff
Posts: 1,015
Registered: ‎10-19-2015

Re: Delete row from List

please post the content of your workflow settings file (I guess it is deleterequest.xml)

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 36
Registered: ‎02-19-2019

Re: Delete row from List

Please see my code below DeleteRequest.xml

 

<?xml version="1.0"?>
<WorkflowRoot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <WorkflowNode id="Root">
    <WorkflowNode id="List_DeleteRequest" label="DeleteRequestList" controller="List" form="DeleteRequest_List">
      <WorkflowTrigger name="SqlTrigger1" method="action" type="SqlTrigger">
        <Param name="Sql" value="SQL[DELETE FROM View_DeleteAsset WHERE ASSET_PK = {ROW.ASSET_PK}]" />
      </WorkflowTrigger>
    </WorkflowNode>
  </WorkflowNode>
</WorkflowRoot>
Staff
Posts: 1,015
Registered: ‎10-19-2015

Re: Delete row from List

I did not realize you are calling the trigger from a list. You cannot access directly the ROW placeholder from the trigger, so you have to create your own parameter in the query string. On your action you can have something like:

 

 

IG.trigger({triggerNames:['MyTrigger'],urlParams:{myUrlParameter:{ROW.ID}}}).done(function(result){//do something here just in case})

in the trigger definition it will be:

 

 

 

<WorkflowTrigger name="MyTrigger" type="SqlTrigger" method="action">
	<Param name="Sql" value=" delete from [MYTABLE] where ID={REQUESTCONTEXT.myUrlParameter}"/>
</WorkflowTrigger>

HTH,

Stefano

 

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.