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
Highlighted
Frequent Contributor
Posts: 159
Registered: ‎01-14-2018
Accepted Solution

Capturing selected feature field value in M.App Enterprise Workflow

Hello all,

 

I have points features, I select only one point, and I want when I right-click on the feature as in the following picture 

context1.PNG

and choose the last item (a form node of a line feature) to do the following:

  1. open that form of the line feature
  2. capturing a field value from the points feature (that field is not primary key) of the selected point
  3. fill a field in the form of the line feature with the captured value in step(2).

Note:

I tried using {SESSION.MAP.MapSelection} but it gives me value of (system.string[]) although I only selected one point.

Kind Regards

Khaled

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: Capturing selected feature field value in M.App Enterprise Workflow

hi Khaled,

 

MapSelection stores anyway an array, beside the number of selected elements. What you can do is to setup a formtable in your line feature form and populate it with the sesssion variable, something like:

 

<FormTable name="selectedObject" visible="true" datatype="guid" defaultvalue="SQL[select id1 from facilities where id1 in ({SESSION.Map.MapSelection})]" lov="SQL[select * from facilities where id1 in ({SESSION.Map.MapSelection})]" persisted="false" saveinsession="false" override="false" selectionmode="multiple" rowcount="15">
  <FormTableField name="borough" datatype="string" />
  <FormTableField name="facname" datatype="string" />
</FormTable>

This way you have the primary key value of your point feature. You can then do any selection in an additional formfield to get the desired attribute.

 

I'm just not sure how you would select the line feature, since you are using another layer active in the legend.

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial