0

I have been reading the following issue https://github.com/opengisch/QField/issues/729 about populating a field (by default) with a user account name. Because they speak about a workaround with global variables I also checked the QGIS variable list and some interesting articles by Nyall Dawson

Anyway, I am still looking for a way to add a proper @QField_user_account_name (I am afraid this variable doesn't exist yet) in a QGIS project.

I assume the global variable is a work around but I don't see how to apply this. Also note that the user_account_name in QGIS is different from the user_account_name in QField (see printscreens). For example, when I add a 'editor' field in an attribute table of a certain layer with the variable @user_account_name, the field will be automatically populated with my user name from the pc when working in the office and with my QField (technical) user name when working in the field.

In other words, the questions are

  1. Can I have the same user name for myself or other collaborators when using Qfield on mobile or QGIS on pc?
  2. Is there a workaround to have a non-technical user name like 'u0_a5' from QField?

I am working with QGIS 3.16.3 and QField 2.0.8 with cloud sync activated.

enter image description here

enter image description here

enter image description here

0

A friend helped me with my second question: "Is there a workaround to have a non-technical user name like 'u0_a5' from QField?"

Yes ;-) The solution was simple but I didn't see it. Each mobile device user needs to add an additional variable under settings in the Variable tab like for example:

qfield_user_name = My name (without the =) or

qfield_user_name = Your name or...

Next, to see the QField user's name in the attribute table/layer(s) of the project, you need to add a text field with the standard notation for a variable, in this case @qfield_user_name. That way, each time a collaborator adds a new feature, the qfield user name will automatically be registered. Brilliant!

enter image description here enter image description here enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.