04-12-2018 07:39 AM
In gmsc2016 documentation, I've found the following description of form NewAction and EditAction
"Each form that interacts with the Smart Client needs a FormGeometry element. The name of the FormGeometry defines the geometry column name of the current entity, and the layer defines the feature name or the featureId of the feature that should be edited. Furthermore, you have to define which actions should be available in case that it is a new entry or the geometry is null (NewActions) and which actions should be available in case of an existing entry (EditActions)."
But, still I don't know what is the difference between GE_POLYGON in NewActions and in EditActions. What does it mean that "it is a new entry "? What factor decides that it is a new entry? Should some javascript code be executed for it?
<FormGeometry name="GEOMETRYCOLUMNNAME" layer="ENTITY_NAME of the feature">
<NewActions>
<GeometryAction name="GE_NEWPOLYGON"/>
</NewActions>
<EditActions>
<GeometryAction name="GE_NEWPOLYGON"/>
</EditActions>
</FormGeometry>
Solved! Go to Solution.
04-12-2018 11:15 PM
if the currently selected object does not have a geometry then NewActions will be available. In case there is already a geometry you should use EditActions.
Stefano
04-12-2018 11:16 PM
Hi
The decision, if the entry is new or not, is based on the ID field. If you load your form and the ID field is not taken from the database it is a new object (you can use for example emptyform=true in WorkflowSettings). If you click on a feature, open your form and the form is filled out with the information of your feature, then you'll edit the feature. SmartClient decides itself if it has to use edit or new actions.