---
title: How to change an application's acronym
slug: user-guide-10x/how-to-change-an-applications-acronym
docTags: 
createdAt: 2025-12-15T08:01:01.119Z
---

In the case that an application’s acronym needs to be changed, a script will need to be run against an offline deployment of Swimlane.

The script is a Python script. Save the below into *ChangeAcronym.py*:

:::BlockQuote
import pymongo
import ssl

\# ID of Application to change acronym on
appId = "aDwSZk8eyBt\_GhZz4"

\# The current app acronym
oldAcroynm = "IR1"

\# The new app acronym that will replace the old acronym NO MORE THAN 4 CHARACTERS
newAcronym= "ADM"

\# The address of the MongoDB server
mongoServer = "localhost"

\# The port of the MongoDB server (27017 is default port)
mongoPort = 27017

\# Username to authenticate to MongoDB as
mongoUser = "Admin"

\# Password for MongoDB user
mongoPass = "\<password>"

\# MongoDB database that stores the user account we are authenticating as
mongoAuthDatabase = "admin"
mongoAuthMechanism = "SCRAM-SHA-256"

database = pymongo.MongoClient(host=mongoServer, port=mongoPort, username=mongoUser, password=mongoPass,
&#x20;                              authSource=mongoAuthDatabase, authMechanism=mongoAuthMechanism, ssl=True,
&#x20;                              ssl\_cert\_reqs=ssl.CERT\_NONE).Swimlane

app = database.Applications.find\_one(\{"\_id": appId})

if app is None:
&#x20;   print("Application not found")
&#x20;   quit()

trackingFieldId = app\['TrackingFieldId']
app\['Acronym'] = newAcronym

for field in app\['Fields']:
&#x20;   if field\['\_id'] == trackingFieldId:
&#x20;       field\['Prefix'] = newAcronym + '-'

database.Applications.save(app)

for record in database.Records.find(\{"ApplicationId": appId}):
&#x20;   new\_tracking\_full = record\['TrackingFull'].replace(oldAcroynm, newAcronym)
&#x20;   record\['TrackingFull'] = new\_tracking\_full
&#x20;   record\['Name'] = new\_tracking\_full

&#x20;   for value in record\['Values']:
&#x20;       if value\['k'] == trackingFieldId:
&#x20;           new\_tracking\_full\_value = \{'\_v': \{'v': new\_tracking\_full}}
&#x20;           value\['v'] = new\_tracking\_full\_value

&#x20;   record\['ValuesDocument']\[trackingFieldId] = new\_tracking\_full
&#x20;   database.Records.save(record)
:::

How to use the script properly:

1. Shut down the Swimlane services
2. Update the variables at the top of the script to match your environment.
3. Execute the python script:

:::BlockQuote{indent="1"}
python ChangeAcryonym.py
:::

4. Turn Swimlane services back online
5. Verify the acronym change in Swimlane


The application should now be changed.
