In relation to editing Tables, reordering, remaning etc.. can be carried out 
using Refactor fields, which can be found in the Processing Toolbox
Regards,

Richard.




——
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

——
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964 T +353 46 942 2409
https://gov.ie/opw

——
To send me files larger than 30MB, please use the link below 
https://filetransfer.opw.ie/filedrop/richard.mcdonn...@opw.ie

Email Disclaimer: 
https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/

——
MSc GIS, FME Certified Professional

——
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
——
M +353 87 688 5964 T +353 46 942 2409
https://www.opw.ie

——
Email Disclaimer: https://www.opw.ie/en/disclaimer/
From: Qgis-user <qgis-user-boun...@lists.osgeo.org> On Behalf Of Tudorache, 
Marian
Sent: 01 June 2021 15:27
To: Ursula Heinze <ursula.hei...@online.de>; Qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] Rename column

There should be a method renameAttribute as part of QgsVectorLayer class.

You can do something like that:

layer = iface.activeLayer()
for field in layer.pendingFields():
    if field.name() == 'old':
        with edit(layer):
            idx = layer.fieldNameIndex(field.name())
            layer.renameAttribute(idx, 'new')

Good luck!
Marian

From: Qgis-user 
<qgis-user-boun...@lists.osgeo.org<mailto:qgis-user-boun...@lists.osgeo.org>> 
On Behalf Of Ursula Heinze
Sent: June 1, 2021 5:26 AM
To: Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>
Subject: [EXT] [Qgis-user] Rename column

CAUTION: This email originated from outside of the organization. If you do not 
recognize the sender or you are not certain the content is safe, then do not 
click on any links or open any attachments.
AVERTISSEMENT : Ce courriel provient d’une source externe à l’organisation. Si 
vous ne reconnaissez pas l’expéditeur ou si vous doutez de la sécurité du 
contenu, ne cliquez sur aucun lien et n’ouvrez aucune pièce jointe.

Hello,
I have a little problem with the field calculator. I want to rename a column, 
and I don´t find any way to do it.
Now I tried to copy the field values in a new column with the right name, and 
am also not successful. Has anybody an idea for me, how to solve the problem? 
Many thanks in advance!
Ursula Heinze

Gesendet von 
Mail<https://urldefense.com/v3/__https:/go.microsoft.com/fwlink/?LinkId=550986__;!!P0kg3YazkQ!W94jRKLCVMrbhztEtw9jiDUPiECzoEscG5JxdIsa3_vpvGZuh4v0QGxdDJLtJD0Tmg$>
 für Windows 10


________________________________

This electronic message, as well as any transmitted files included in the 
electronic message, may contain privileged or confidential information and is 
intended solely for the use of the individual(s) or entity to which it is 
addressed. If you have received this electronic message in error please notify 
the sender immediately and delete the electronic message. Any unauthorized 
copying, disclosure or distribution of the electronic message is strictly 
forbidden. NAV CANADA accepts no liability for any damage caused by any virus 
and/or other malicious code transmitted by this electronic communication.

Le présent message électronique et tout fichier qui peut y être joint peuvent 
contenir des renseignements privilégiés ou confidentiels destinés à l’usage 
exclusif des personnes ou des organismes à qui ils s’adressent. Si vous avez 
reçu ce message électronique par erreur, veuillez en informer l’expéditeur 
immédiatement et supprimez le. Toute reproduction, divulgation ou distribution 
du présent message électronique est strictement interdite. NAV CANADA n’assume 
aucune responsabilité en cas de dommage causé par tout virus ou autre programme 
malveillant transmis par ce message électronique.

Please note that the existing 01-6476XXX / 046-9426XXX numbering ranges will no 
longer be available after 30th April 2021.
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to