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 
Occasional Contributor
Posts: 8
Registered: ‎03-15-2019

Mobile App: key value field in FeatureInfo

Hello, I'm trying to figure out if this is possible.


When selecting a geometry on my map, a FeatureInfo shows up.


<MarkerVectorLayer Entity="Tree" Icon="Icons.Tree_Pin.png"  ZIndex="3" MinimumZoomLevel="13" MaximumZoomLevel="22">
	<FeatureInfo Title="@{treeNr}, @{vitality}" Detail="@{user}, @{date}">
		<NavigateShellAction Icon="Edit" Target="Form">
			<Parameter Name="Id" Value="@{id}" />

Vitality is coded by the numbers from 1 to 5 and that stand for healthy to dead. The Picker KeyValueList enables the possibility, in the List I am able to display it by using this:


<ListCell Name="vitality" Title="Vitality">
        <Mapping Key="1" Value="healthy" />
        <Mapping Key="2" Value="slightly weak" />
        <Mapping Key="3" Value="very weak" />
        <Mapping Key="4" Value="sick" />
        <Mapping Key="5" Value="dead" />

Works fine. In the MapView however, when I insert the FeatureInfo @{vitality} is of course shown by number. How can I map a value to my key in the field that is displayed in the FeatureInfo?


Thanks for any help!

Posts: 1,088
Registered: ‎10-18-2015

Re: Mobile App: key value field in FeatureInfo

Hello LauraLou,


you can use a script to do the mapping:





You can use Context.getValue('intvalue'), map it in the script and set it on e.g.: Context.setValue('intvaluetitle', mappedvalue) and use that in the placeholder.




Stefano Turcato
Presale Engineer
Hexagon Geospatial