Skip to content

Extra QGIS Variables

The Mergin Maps QGIS plugin adds several variables that can be used in QGIS expressions:

Variable nameSample valueScopeDescription
@mm_full_namemartin second nameglobalFull name of the currently logged in user, blank if the full name is not set
@mm_usernamemartinglobalUsername of the user currently logged in to Mergin Maps
@mm_user_emailmartin@example.comglobalEmail of the user currently logged in to Mergin Maps
@mm_urlhttps://app.merginmaps.comglobalURL of the Mergin Maps service
@mm_project_nameTree surveyprojectName of the active Mergin Maps project
@mm_project_full_namemartin/Tree surveyprojectWorkspace and project name joined with a forward slash
@mm_project_version42projectCurrent version of the active project

A common use case is to use @mm_username or @mm_user_email as the default value for one of the fields in a survey layer to automatically track who has added (and/or modified) a particular record.

mergin_ variable names still work!

QGIS variables listed here previously used the prefix mergin_. Now we use the prefix mm_ standing for Mergin Maps.

Both naming options are functional and will continue to work in the future: @mergin_user_email and @mm_user_email provide the same value when used in QGIS expressions.