Issue with custom letter field - auto nesting
I've been trying to create a custom letter for acknowledgements and am running into an error when inputting additional fields.
Working from the default flow listed here I've created a letter that will include a receipt amount. After following the steps from the Build Templates tutorial I'm finding every time I input the dynamic content receipt amount to the Populate a Microsoft Word template the flow automatically updates and creates an additionally nested “for each” loop. The same goes for appending the values to the array.
I've tried inputting different values in the field and some will cause the same error, however others (such as the Gift Amount) come out fine with no error. I have a pretty low-level understanding at this point of custom flows and editing things outside of the default templates so any help would be great.


Comments
-
Hi Connor,
The reason why you're running into that issue is that some aspects of the records behind the scenes support multiples, even if they're not actually in use right now, or if you only use one. For example, think of split gifts. Even if you don't actively do split gifts, the system behind the scenes still needs to account for that possibility. If you were to try to pull in Fund information for a gift, you'll see the same thing (automatically putting in a loop). If there's even the potential of having multiples, it automatically throws in a loop in order to account for all the multiples.
The next question is “if I know I'm only going to have one of X, how can I keep a loop from showing up?”. There is a Mini Skills lab (see https://community.blackbaud.com/forums/viewtopic/586/58330 ) that covers this scenario, with a focus on Fund Description and Payment Method. The same thought process can be applied to most anything else in the same scenario.
2 -
Here's what I did:
In Compose, I put in the expression item()['receipts'][0]['amount/value'] then formatted the number and dropped that into the template.
4 -
Thank you!! I was able to work through it from Glen's response however I ran into the issue of grabbing the value rather than the amount, until I read your answer.
2 -
Connor Pearson:
Thank you!! I was able to work through it from Glen's response however I ran into the issue of grabbing the value rather than the amount, until I read your answer.
Glad you got it worked out. One point for you or those that may be reading this later. You may come across some areas that may “randomly” pop up a loop. You may think to yourself “wait, the system doesn't even allow for multiple [insert item]”. When the APIs were being created, the decision was made to allow for multiples of certain items “in case” in the future we built that in. It doesn't mean we will, but more of a just in case so the APIs wouldn't have to be redone. For those scenarios, this method can still be used.
2
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