Select to view content in your preferred language

How to use python to update user profile description with multiple lines

184
2
Jump to solution
02-11-2025 08:27 AM
ThomasColson1
Occasional Contributor

How to use python to update user profile description with multiple lines? Using arcgis.gis module | ArcGIS API for Python

 

I've tried: 

for u in range(len(users)):
users[u].update(description='First line' chr(10)'Second line')

for u in range(len(users)):
users[u].update(description='First line' + chr(10)+ 'Second line')

for u in range(len(users)):
users[u].update(description='First line \n Second line')

 

and every single possible variation of python new line and all I get is

 

ThomasColson1_0-1739291088693.png

What I need is: 

ThomasColson1_1-1739291123559.png

Declaring a string doesn't work either. No matter what, it puts all the text on a single line in the profile. 

 

 

 

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi @ThomasColson1, I used Fiddler to see what was being sent when updating a profile's description.  I found 
 was used for a carriage return.  According to this link, this is the HTML Number.

 

user.update(description='this is 
an example')

 

returns the following:

JakeSkinner_0-1739448063464.png

 

View solution in original post

0 Kudos
2 Replies
DavidPike
MVP Notable Contributor

Possibly might accept some html like <br> but unlikely.   I'd enter it manually then read the description value returned from the Python API if you haven't tried that already.

JakeSkinner
Esri Esteemed Contributor

Hi @ThomasColson1, I used Fiddler to see what was being sent when updating a profile's description.  I found &#13; was used for a carriage return.  According to this link, this is the HTML Number.

 

user.update(description='this is &#13;an example')

 

returns the following:

JakeSkinner_0-1739448063464.png

 

0 Kudos