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
Regular Contributor
Posts: 284
Registered: ‎03-10-2016
Accepted Solution

DesktopApp: Relation between selected element and workflow

Hi!

 

I want to create a workflow which should show properties of a selected feature but I come to a stillstand when "connecting" my selected feature from map to the workflow.

 

Starting the workflow works fine: I activate my feature class, select a feature, now my workflow gets "active" and I start it.

My list opens fine but shows all the features out of my featureclass, and not just "the one"

 

My question is: Where must I set this "connection"? Is it a script when starting the workflow? Or can I configure this comfortable in workflow-manager?

 

I think this must be a simple question for soemebody with experience on workflows ;-)

Thanks in advance!

 

Stefan

 

 

GAUSS Ingenieurtechnik GmbH | Germany
Highlighted
Technical Evangelist
Posts: 691
Registered: ‎11-12-2015

Re: DesktopApp: Relation between selected element and workflow

Lists by rule will provide many results so a filter is needed if you wish to be specific.

In this case the MapSelection can be retrieved using SESSION variables in the List filter.

 

Here is statement I use to accomplish this where 'id3' is the PK and {SESSION.MAP.MapSelection} retrieves the selected feature from the current SESSION:

 

id3 IN ({SESSION.MAP.MapSelection}

 

Screenshot to show where I use this in the List configuration;

 

MapSelection.PNG

Highlighted
Regular Contributor
Posts: 284
Registered: ‎03-10-2016

Re: DesktopApp: Relation between selected element and workflow

Hi sclow,

thanks a lot, that's it!

 

Stefan

GAUSS Ingenieurtechnik GmbH | Germany
Highlighted
Occasional Contributor
Posts: 14
Registered: ‎11-10-2015

Re: DesktopApp: Relation between selected element and workflow

Dear all,

for a list we used this filter:

 

id in ({SESSION.Map.MapSelection})

 

At the moment when I open the application the list is empty, only If I select some points in the map the list is updated (I used a workflow to update the list). I want to see, in the list, when the application starts all the value in the table. Can we use a filter like this:

CASE
            WHEN  COUNT({SESSION.Map.MapSelection}) > 0 THEN  id in ({SESSION.Map.MapSelection})

            ELSE TRUE

END

Highlighted
Staff
Posts: 1,057
Registered: ‎10-18-2015

Re: DesktopApp: Relation between selected element and workflow

Hi Massimo Smiley Happy,

 

you may try something like in this post:

https://community.hexagongeospatial.com/t5/Developer-Discussions/None-empty-values-in-a-LOV/m-p/1720...

 

The case statement should also work, but your else condition must return the list of all the IDs.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial