# Show counter dynamc property in "Auto-report format for movement within this map" in Map Window object

**URL:** <https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089>\
**Category:** Module Design\
**Created:** [July 24, 2022, 8:41am UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089 "2022-07-24T08:41:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![javor](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/javor/32/2598_2.png) [@javor](https://forum.vassalengine.org/u/javor)\
**Post date:** [July 24, 2022, 8:41am UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/1 "2022-07-24T08:41:56Z")

</div>

Hi.

I’m trying to show a piece dynamic property (Country2) contents in the message shown when a unit is moved in the map.

I have not been able to do it ☹

I have tried with different formats:

- $Country2$
- {Country2 }
- {GetProperty(“Country2”)}

As far as I can see only a group of fixed piece properties are available.

Is there any way to reach the piece properties from the the Map Window?

---

<div class="post-metadata">

**Author:** ![palad0n](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/palad0n/32/215_2.png) [@palad0n](https://forum.vassalengine.org/u/palad0n)\
**Post date:** [July 24, 2022, 11:49am UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/2 "2022-07-24T11:49:49Z")

</div>

Make Country2 a global property. Use Set Global Property trait instead of a DP. You can reuse the same trigger that the DP used.

---

<div class="post-metadata">

**Author:** ![jrwatts](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/jrwatts/32/6972_2.png) [@jrwatts](https://forum.vassalengine.org/u/jrwatts)\
**Post date:** [July 24, 2022, 10:39pm UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/3 "2022-07-24T22:39:25Z")

</div>

Add a new Global Property, and in the action that is triggered by the unit moving on the map, add a Set Global Property trait which copies the current value of `Country2` to the new GP. Then you can display that new GP.

---

<div class="post-metadata">

**Author:** ![javor](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/javor/32/2598_2.png) [@javor](https://forum.vassalengine.org/u/javor)\
**Post date:** [July 25, 2022, 6:30pm UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/4 "2022-07-25T18:30:02Z")

</div>

I see your logic. But not sure it’s going to work for my use case.

I have pieces that can be moved in a map. They have traits for moving them or they can be moved by dragging with the mouse.

The pieces have a Report Action trait for showing a message describing the movement in the log. This trait can reach the DP Country2 without any problem.

My issue is: When a piece is moved with the mouse, the Report Action trait is not called and only the  
`Auto-Report format for movement within that map` message is shown in the map. And this one has no access to the DP Country2.

It seems that I will have to find a different way to handle that issue.

Thanks for your answers guys!!

---

<div class="post-metadata">

**Author:** ![jrwatts](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/jrwatts/32/6972_2.png) [@jrwatts](https://forum.vassalengine.org/u/jrwatts)\
**Post date:** [July 25, 2022, 8:42pm UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/5 "2022-07-25T20:42:15Z")

</div>

If you’re not already using the “Command to trigger when a piece ends movement on this map” (in the Map properties), the solution is as simple as adding the trigger for your movement report action to that field (assuming all your pieces use the same command for that Report Action). If you’re already using that, you need to make sure it triggers a Trigger Action which includes the movement report command.

Edit: Either way you would probably also want to blank out the `Auto-Report format for movement within this map` field, to avoid a double-report.

Edit 2: It just occurred to me that this might cause the report to trigger twice when you use Send to Location, but that can be fixed by removing the manual call to the Report Action that you’re presumably triggering along with the Send to Location.

---

<div class="post-metadata">

**Author:** ![javor](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/javor/32/2598_2.png) [@javor](https://forum.vassalengine.org/u/javor)\
**Post date:** [July 26, 2022, 6:31pm UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/6 "2022-07-26T18:31:14Z")

</div>

@jrwatts Your solution fixed my need. 🙂

To summarize in case someone ends here looking for the same issue.

- I removed the message `Auto-Report format for movement within this map`
- I added a key command name to `Key command to apply to all units ending movement on this map`
- Added the same key command name to the Report Movement trait in my pieces

With that I manage to have access to the piece properties in the generated message.

Thanks for your help!!!

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [February 13, 2023, 10:07am UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/7 "2023-02-13T10:07:42Z")

</div>

> [@javor](#):
>
> My issue is: When a piece is moved with the mouse, the Report Action trait is not called and only the  
> `Auto-Report format for movement within that map` message is shown in the map. And this one has no access to the DP Country2.

Just coming back round to this, there is no reason that an Auto-report format can’t see a DP in a piece and report on it. Country2 won’t appear in the drop-down, but referencing $Country2$ anywhere in the report format should show it.

Make sure that the piece you where using to test this actually had a value for the Country2 property.

---

<div class="post-metadata">

**Author:** ![marktb1961](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/marktb1961/32/231_2.png) [@marktb1961](https://forum.vassalengine.org/u/marktb1961)\
**Post date:** [February 13, 2023, 12:09pm UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/8 "2023-02-13T12:09:06Z")

</div>

> [@Brent\_Easton](#):
>
> Just coming back round to this, there is no reason that an Auto-report format can’t see a DP in a piece and report on it. Country2 won’t appear in the drop-down, but referencing $Country2$ anywhere in the report format should show it.
> 
> Make sure that the piece you where using to test this actually had a value for the Country2 property.

Begging to differ, e.g. this Auto-Report format tests various types of normal properties. It looks like only module level GPs are reportable (in addition to the special feature-level properties):  
`BasicName=$BasicName$ Obscured=$Obscured$ MapGP=$handSide$ CurrentZone=$CurrentZone$ CurrentMap=$CurrentMap$ ModuleVersion=$ModuleVersion$ ModuleGP=$activeSide$`

This results in the output for card moved on the map:

- BasicName= Obscured= MapGP= CurrentZone= CurrentMap= ModuleVersion=4.3.0a04 ModuleGP=Player 2

I recall it has been discussed before and I thought concluded that map movement auto-reports couldn’t see properties from the piece’s viewpoint.

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [February 13, 2023, 8:59pm UTC](https://forum.vassalengine.org/t/show-counter-dynamc-property-in-auto-report-format-for-movement-within-this-map-in-map-window-object/75089/9 "2023-02-13T20:59:24Z")

</div>

Ah yes, indeed. Had a peek at the code. The reason is that the move reports are a collective report for a group of units, so you can only report on properties that all the units share.
