Flow- Word Merge adds extra line
I have an acknowledgement flow set up. I have a string variable that pulls in the preferred address lines from get a constituent.
I have the pref address lines then pref city, pref state, etc. I put the string variable into the Populate Word Template.
When someone has more than 1 address line it adds an extra line. I CANNOT figure out how to get rid of this. I've searched the community and RE Facebook group and no one had answers there either.
Here is an example:
Roger Rabbit
PO Box 999567
4 Bunny Lane 18th Floor
St. Catharines, ON L2R7A7
Canada
It looks fine in the Flow when I review the output from the last run. No extra line.
This is one plain text control in Word with the allow carriage returns marked.
Has this happened to anyone else? What was your fix? Do I need to do a long expression with if statements for this?
Thanks,
Carol
Comments
-
As I was investigating more- it seems in the API it adds a new line/line return in the preferred address lines:
"address_lines": "PO Box 999567\\r\\n4 Bunny Lane 18th Floor",
so somehow I need to replace the \\r\\n with just a “\\n” perhaps…
1 -
@Carol Grant
\\r\\n or \\n is only going to do 1 newline character, so it shouldn't be.however, it doesn't hurt to try. so you can try replacing \\r\\n with a non-special character first and see how it behaves. (i.e. just a “dash” (-) character)
the expectation would be PO Box 999567-4 Bunny Lane 18th Floor
1 -
I actually found this solution and it works great. The /r/n is this: decodeUriComponent('%0D%0A') and then you replace it with a new line which is this: decodeUriComponent('%0A')
replace(outputs('Get_a_constituent')?['body/address/address_lines'],decodeUriComponent('%0D%0A'),decodeUriComponent('%0A'))
Now I just need to find a way to remove the line where there isn't a country listed.
0 -
@Carol Grant
what I do with address is, I do not have separate “input field” for each (address line, city, state, zip, country), instead I just have ONE input field that is multi-line “block”. Then in power automate, I'll craft the address block, so for country that is blank (or United States), I will not append a newline charcter follow by country.0 -
@Alex Wong- that is sort of what I'm doing, see below.
I'm not using the Formatted Address in Get Constituent.
Line 1= Addressee Name with a hard return in the variable.
Line 2= Address Lines with the replace for the /r/n
Line 3- Variable to add a comma to City then State and Zip Code
Line 4- Country if it says United States leave blank else Country.
Many of these are wanted by my Gift Processing team, the City and comma, don't show United States if it appears.
Do you add the line return differently, I just put a hard return in the string variable. I'd love to see how others are doing it.
0 -
@Carol Grant
if there is expectation for a specific “field” to be potentially blank and newline needed or not based on that, then you have to account for them in expression.Specifically for conntry, it will be right after the “zip/post code” but don't hit “enter” to go to next line. use expression to condition @{if(or(equals(country_field,'United States'),empty(country_field)), ‘’, concat(expression_for_newline, country_field))}
0
Categories
- All Categories
- 6 Blackbaud Community Help
- High Education Program Advisory Group (HE PAG)
- BBCRM PAG Discussions
- Luminate CRM DC Users Group
- DC Luminate CRM Users Group
- Luminate PAG
- 186 bbcon®
- 1.4K Blackbaud Altru®
- 389 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 14 donorCentrics®
- 355 Blackbaud eTapestry®
- 2.4K Blackbaud Financial Edge NXT®
- 616 Blackbaud Grantmaking™
- 542 Blackbaud Education Management Solutions for Higher Education
- 33 Blackbaud Impact Edge™
- 3.1K Blackbaud Education Management Solutions for K-12 Schools
- 909 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 207 JustGiving® from Blackbaud®
- 6.2K Blackbaud Raiser's Edge NXT®
- 3.5K SKY Developer
- 236 ResearchPoint™
- 116 Blackbaud Tuition Management™
- 375 YourCause® from Blackbaud®
- 160 Organizational Best Practices
- 232 The Tap (Just for Fun)
- 31 Blackbaud Community Challenges
- Blackbaud Consultant’s Community
- 19 PowerUp Challenges
- 3 Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 Raiser's Edge NXT PowerUp Challenge: Events
- 3 Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 Raiser's Edge NXT PowerUp Challenge #1 (Query)
- 71 Blackbaud Community All-Stars Discussions
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 743 Community News
- 2.8K Jobs Board
- Community Help Blogs
- 52 Blackbaud SKY® Reporting Announcements
- Blackbaud Consultant’s Community
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
- Blackbaud Francophone Group
- Blackbaud Community™ Discussions
- Blackbaud Francophone Group