Add a value from a user macro to a content property

Hi,

I am new to Confluence apps development and would need to use a value selected in a user macro as value to update a custom content property.

In my mind should be something simple, but whatever I tried so far is not working. Does anyone know how to do this? Could you point me to an example? By the way, I am developing the app for Server/DC 7.19 LTS.

Thanks a lot in advance