Adding the constituent name in List Gifts notification
Options
Hi there,
What is the trick to add the constituent name in Create HTML table or Create CSV using the List Gifts? It is not included in the LIst Gifts so I tried using Get Constituent in the For Loop then Select the fields which works - I'm able to pick the constituent name. However, I can't create a HTML table outside the loop for the List Gifts including the name. Your help will be appreciated if someone can direct me how to properly write the code.
thanks,
Jundino
What is the trick to add the constituent name in Create HTML table or Create CSV using the List Gifts? It is not included in the LIst Gifts so I tried using Get Constituent in the For Loop then Select the fields which works - I'm able to pick the constituent name. However, I can't create a HTML table outside the loop for the List Gifts including the name. Your help will be appreciated if someone can direct me how to properly write the code.
thanks,
Jundino
Tagged:
1
Comments
-
I have also been trying to do this with no luck. I'm hoping that someone can help.0
-
Hi Jundino,
There are probably a few ways this could be accomplished, but one way is to loop over the results of the List Gifts action and call Get Constituent to retrieve the name (as you're doing). You can use the addProperty() function to append the name to the current item in the array, but the trick is you'll need to compose a new array to contain the result. I'll create a flow to demonstrate this and paste in some screen shots today.0 -
Here's a flow that demonstrates the technique I described above (and this is just an example, you could certainly rearrange some steps in this flow if desired).
First, I'll initialize a new empty array variable to hold the "augmented" gift items which will include the constituent name (note the empty brackets provided as the default Value for the variable):
Next, I'll use the List gifts action (with whatever criteria is desired) to fetch gifts:
I'll iterate over the results, and within the loop use the Get a constituent action to fetch the constituent details. I'll then use the Compose action to compose a new object (including the constituent name), and then use the built-in Append to array variable action to append that new object to the gifts array variable:
In the above Compose action, the addProperty() function is used to add a new property named "Constituent Name" to the current item in the loop:
addProperty(item(), 'Constituent Name', outputs('Get_a_constituent')?['body/name'])Now, outside of the loop, for convenience I'll use the built-in Select action to project a new array object (based on the gifts array variable) containing only the fields I want in my HTML table:
The Select actions also allows me to specify more user-friendly column names, and the map formulas I'm using for the column values are:
item()?['id']
item()?['type']
item()?['amount/value']
item()?['constituent_id']
item()?['Constituent Name']
Finally, I use the built-in Create HTML table action to built the HTML table based on the output from the Select action:
So my completed flow looks like this:
...and when the flow runs, the HTML table will look like this:
I hope this helps demonstrate the approach - please let us know if you have questions!1
Categories
- All Categories
- 2 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
- 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™
- 160 Organizational Best Practices
- 232 The Tap (Just for Fun)
- 30 Blackbaud Community Challenges
- Blackbaud Consultant’s Community
- 18 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