Spouse Code only certain ones for Receipt
I am working on a receipt flow and I want to look at the primary donor code of the spouse and see if it matches a special list of donor codes that we have when we want to send to both parts of the couple.
For example, if the spouse has a code of Trustee and the donor has a code of Alumni, then we want to address the receipt to both of them. If the spouse code is a Friend then it won't be addressed to both of them. There are 11 donor codes that we want it addressed to go to both.
What I have doesn't work, it returns false even though it should be true. Details below.
Part 1 of the Spouse part- I filter the Spouse constituent codes by Sequence =1 and then append it to a string. See below, the spouse primary code is Trustee Spouse/Partner

I have loaded the codes into a simple table which is the List rows present.


Then I loop through them and my condition is my variable above.
Spouse Donor Code is equal to
items('Apply_to_each-Compare_to_See_if_Spouse_should_appear')?['Spouse Donor Codes']
This is where I get false even though they should be true! The spellings are correct on both ends. Any other tricks I can do to make this work? Also, this is time consuming in the flow. If the Spouse code is in the list then I pull the Combined Mailing Name instead of the Single Address Name.
Thanks!
Carol
Comments
-
Hello- I figured it out and got some guidance from a search I did on finding a value within an array. I'm not sure if it's correct but it works. It still takes a long time to run. I thought I would share in case anyone tries to do this.
I had to convert my Primary Spouse Code to an array instead of a string because it told me it didn't like it as a string.
Created a Select on the single column from my Excel table and then a Join to put a comma in.
Then did an apply to each on the Sp Donor Code Array
The condition is the Join Output from above contains the item (). The item is the Sp Donor Code Array which contains the Primary Donor Code.
0 -
@Carolyn Grant
Glad you got things to work, however, if you find your run is too long, let's try to trim it down:First to make sure my understanding of your situation is correct:
- You have a SharePoint excel file that contains constituent code that if the spouse record has it, you will format the addressee/salutation differently.
- I'm going to assume that since spouse has constituent code, that means your org record spouse as separate constituent record, not non-constituent spouse
The way to trim things down is to use less Apply to Each. You have 2 arrays: 1 array of spouse constituent codes and 1 array of constituent codes that you seeking to match to (from your “select” action). You do not need to do a Join action nor Apply to each 2 action. You can have a Condition action after your select and do an expression of length(intersection(spouse_array, excel_code_array)) greater than 0, the TRUE path you will set addressee/salutation with spouse, FALSE path you won't.
intersection expression looks at the 2 array and produce a new array of value that exists in both array. Meaning, if the length of intersection expression is greater than 0, means the spouse constituent code array has a value that is same as excel code you seek.
0 -
@Alex Wong- thank you for this, it worked perfectly! I'll remember to use it when looking at two arrays and comparing them.
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