M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 75
Registered: ‎02-19-2019

Merge Polygon

[ Edited ]

Dear Community,

 

I'm facing some issue to merge 2 polygon. I'm using below code. I'm using M.App Enterprise 2018. Please see my below code. I split polygon and then need to merge for my property transaction product development. 

 

 

SC.digitize('ASSETS', {commands: ['MergeSurfaces'], startOnLoad: 'MergeSurfaces'}, [{FORM.ASSET_PK}])
<?xml version="1.0"?>
<FormList xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Form name="MergeForm" editable="true" idfield="ASSET_PK" table="ASSETS">
    <FormTab name="NewTabPage1" editable="true" visible="true">
      <FormGroup name="NewGroup1" editable="true" visible="true">
        <FormField name="ASSET_PK" label="ASSET_PK" editable="true" visible="true" datatype="number" defaultvalue="{REQUESTCONTEXT.ASSET_PK}" defaultvaluemode="onload" required="true" persisted="true" saveinsession="false" type="textfield" override="false" />
        <FormField name="ASSET_ID" label="ASSET_ID" editable="true" visible="true" datatype="string" defaultvaluemode="onload" required="true" persisted="true" saveinsession="false" type="textfield" override="false" />
        <FormField name="FILE_NO" label="FILE_NO" editable="true" visible="true" datatype="string" defaultvaluemode="onload" required="true" persisted="true" saveinsession="false" type="textfield" override="false" />
        <FormField name="TYPE_ID" label="TYPE_ID" editable="true" visible="true" datatype="string" defaultvaluemode="onload" required="true" persisted="true" saveinsession="false" type="textfield" override="false" />
        <FormAction name="Merge" label="Merge Polygon" editable="true" visible="true" action="SCRIPT[SC.digitize('ASSETS', {commands: ['MergeSurfaces'], startOnLoad: 'MergeSurfaces'}, [{FORM.ASSET_PK}])]" />
      </FormGroup>
    </FormTab>
  </Form>
</FormList>

merge.png

 

Error message. 

Error.png

 

When I'm selecting one polygon and open my workflow other polygon is disapearing. How can select another feature ?

 

Kind Regards,

Liton

Technical Evangelist
Posts: 836
Registered: ‎11-12-2015

Re: Merge Polygon

Hi Liton,

 

This appears to be a bug. I as well dont see ability to select another feature for a merge edit operation.

The only feature that is selectable is the one previously selected and of course this leads to the message you show in your post.

 

I will submit this as a defect report on your behalf.

 

Thanks

Technical Evangelist
Posts: 836
Registered: ‎11-12-2015

Re: Merge Polygon

Hi Liton,

 

I have an update to this discussion.

 

When using MERGESURFACES in order for the workflow to be able to merge multiple polygons the workflow must provide the ability to digitize a new geometry using the NEWPOLYGON command. After the new surface(s) is digitized it will be possible then to MERGESURFACES to existing polygon features through selection.

 

Add 'NEWPOLYGON' command to your code and you will be able to 'MERGESURFACES' in your case.

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

Re: Merge Polygon

Hi sclow,

Happy new year !

 

Thank you so much for your reply. could you send me code example please?

 

Below is my code 

SC.digitize('ASSETS', {commands: ['MergeSurfaces'], startOnLoad: 'MergeSurfaces'}, [{FORM.ASSET_PK}])

Kind Regards,

Liton