Add newline to string variable using concat
There are several ways to Add a newline when appending to string variable:
- Add ‘Enter’ into the expression. concat(‘Line1’,’ ‘,‘Line2’,’ ‘,‘Line3’ )
- Create a ‘NewLine’ variable and in the ‘Value’ field press Enter to assign line return to it. Use this variable in the concatenation.
- Use decodeUriComponent(‘%0A’) expression concat(‘Line1’,decodeUriComponent(’%0A’),‘Line2’,decodeUriComponent(’%0A’),‘Line3’)
Remove newline from string
There seems no easy way to remove newline/line break from multiline string. One solution is to convert the string to printable character using uriComponet function. The newline will be shown as %0A. We then use replace to remove the %0A and convert the the string back to normal string.
uriComponetToString(replace(uriComponent(yourstring), '%0A', ''))
Single quote
If you require to preserve/escape single quote in a string, replace single quote with two single quotes.
FEATURED TAGS
ai
api
automation
azure
azure cosmos db
azure openai
azure vm
base64
dax
docker
excel
execution plan
hyper-v
infrastructure
m
machine learning
machine learning services
network
network card
performance
power automate
power bi
power bi report tricks
power query
powershell
python
qgis
query performance
regex
replication
snowflake
sql
sql script
sql server
sql server admin
sql server config
ssl
ssms
troubleshooting
unicode
vmware