Hexagon Geospatial

Developers Knowledge Base

GeoMedia Smart Client Workflow Manager provides tools for building and delivering highly-constrained, map-based workflows for the office or the field.
Showing results for 
Search instead for 
Do you mean 

Oracle sequences (How To)

by Technical Evangelist ‎09-01-2015 11:41 PM - edited ‎04-13-2016 11:59 PM (762 Views)

To use an Oracle sequence as your id field, you need to use a second form. In the following example inherit is used to prevent code duplication.


In your inherited form you need to change the following attributes on your ID field:

  1. Set visible to false 
  2. Change defaultvalue to select the next sequence value


WorkflowSettings: SequenceTest.xml


 <?xml version="1.0" encoding="utf-8" ?>
   <WorkflowNode id="0" label="Sequence Test">
     <WorkflowNode id="1" label="Sequence Test" controller="List" form="SequenceTestForm" follownode="2">
       <WorkflowNode id="2" label="Sequence Test" controller="Form" form="SequenceTestForm" follownode="1" />
     <WorkflowNode id="3" label="Sequence Test New" controller="Form" form="SequenceTestNewForm" follownode="1" emptyform="true" />



FormSettings: SequenceTest.xml



 <?xml version="1.0" encoding="utf-8" ?>

   <!-- default form -->
   <Form name="SequenceTestForm" table="SEQUENCETEST" idfield="Id">
     <FormTab name="Tab">
       <FormGroup name="Group">
         <FormField name="Id" datatype="number" visible="hidden" />
         <FormField name="Name" required="true" visible="form,list" />
     <FormAction name="Save" action="Save" />

   <!-- form to create a new dataset -->
   <Form name="SequenceTestNewForm" inherits="SequenceTestForm">
     <FormTab name="Tab">
       <FormGroup name="Group">
         <FormField name="Id" visible="false" defaultvalue="SQL[SELECT SEQUENCETEST_SEQ.NEXTVAL FROM DUAL]" />