Retrieve "username" in a form

Hi,

Is it possible to retrieve in a form the "username" used in the configuration of the application.

Serveur config panel

My form

Is there a constant in the same way as "deviceid" that we can retrieve, example:

<bind nodeset="/data/DeviceId" type="string" jr:preload="property" jr:preloadParams="deviceid"/>

Thanks

Hi @Olivier_Poujade!
Yes you can do that, but to do so you'll have to add a metadata field of kind "username" to the form. The username is not included by default. I always include username, device ID, start time and end time because it adds no delay to the form and provides valuable metadata.

It works !

<bind nodeset="/data/Username" type="string" jr:preload="property" jr:preloadParams="username"/>

Thank you, indeed it was simple, just I hadn't seen this "username" constant in the documentation and so I hadn't blindly tested.
Perfect

1 Like

Hi @Olivier_Poujade. Metadata "questions" are discribed here :

1 Like

Thanks for the reference in the documentation. I hadn't picked it up. :grinning: