Sharing my Power Automate template: Add custom field based on list
Description: Use this flow to add a custom field to constituent records in a list if the custom field is not already on the record.
Required connections: Blackbaud Raiser's Edge NXT Constituents
Suggested skill level required to use this template: Beginner
Category: Power Automate, Data Health
Instructions: *Read through the notes on each step of the flow for further details and background on the purpose of each step.*
- Create a list in NXT web view.
- Choose your list within the List Constituents step.
- Click on Apply to each - Constituents from List, and then click Condition - Checks True False.
- Update the condition and the Yes branch of the condition with the custom field information you want to add to constituent records when necessary.
- It is recommended to test this flow with a sample list containing 1-2 constituent records before applying to all records that meet the criteria.
The list initially used in this flow grouped together donors who have given $1k+ in the current fiscal year. The flow runs nightly on all donors currently in the list to see if the custom field relating to this giving level is already on the record (with the help of a variable). If the custom field does not exist, it is added to the constituent record. The flow checks all records in the list each time it runs.
Comments
-
@Torie Wright - for the list constituents step under List am I supposed to put the name of my list or the ID number of my NXT site or what goes here?
0 -
@Joanne Felci
if you see a X to the right of the field for List, click on it first.Then you should see a “down arrow” icon that you can click on to see a drop down of list for you to select.
the action is made such that it let you select the list with the name of the list, however, IF you ever going to use the “Enter custom value” (generally when you dynamically create a list, and want to get the list's constituent, you will use this option), then you will need to make sure you get the List ID, not name of List.
3 -
@Alex Wong - thank you! When I pull down the list it must be the list of custom fields for Torie's database. The only steps before this step that I could put my NXT ID is this one:
0 -
@Alex Wong - forgot to ask how do I find list ID?
0 -
@Joanne Felci
Go to the list you want to use, and click on Share.Copy the URL and paste to a notepad.
the RED part is the List ID.
0 -
@Joanne Felci
the action to put the “list id” (or select from dropdown) is the “List Constituent” actionyou will also need to decide on how you want to have your constituent attribute, which will affect the flow workingness. once you decided on how you want your constituent attribute, you can put the info here, and I can advise you on how to fix up the flow for your own need.
0 -
@Alex Wong - as always you are the best!
Ok, I found the list constituent step but I'm not following what you mean by ‘how you want to have your constituent attribute’
Do you mean the descriptions based on the constituent attribute (thank you for showing me how to get the ID BTW)?
0 -
@Joanne Felci
the original flow uses a specific constituent attribute category: Audience CodeWith a specific Description: HAC Member and Comment: FY23
This means you need to setup a constituent attribute category in your RE NXT of Audience Code with a Description of HAC Member (code table entry or the attribute has to be TEXT).
the flow also statically uses FY23, which means every end of year/begin of year, the flow has to be changed (maybe the Constituent List saved in RE NXT need to be changed too depending on how you setup your list).
So what I am saying is, if you thought through how you want to record your constituent attribute (custom field in RE NXT webview terminology), and if it differs from what the original post's RE configuration, then post that details here, and I can help you modify the flow to your configuration
0 -
@Alex Wong…I want to use this for custom field category of Award with description of Impact
0 -
@Joanne Felci
is “Award” category unique (only allow one?) or is the “combination” Award=Impact unique0 -
@Alex Wong…Award is a custom field that can be put on a record more than once but Award category with description Impact is unique (only allowed or I only want it on the record once)
0 -
@Joanne Felci
I'm going to provide some change to the original flow that you download and import, and apply a little efficiency to the logic.Delete the following actions:
- Initialize variable - CustomFields
- Apply to each - custom fields from single constituent record
After the List constituent custom fields action add an action Filter array and put the value (the one with the description that say “The set of items included in the response…”) dynamic content in the From field of Filter array
Then click on Edit in advanced mode and paste the following in:
@and(equals(item()?['category'], 'Award'), equals(item()?['value'], 'Impact'))The Filter array action will avoid the need to loop through each constituent codes of a constituent and condition on result where the attribute category is Award and value is Impact.
Next we will condition on if the filtered result is equals to 0, if yes, add the constituent attribute:
Go to the expression tab and enter: length(body('Filter_array')) 0 -
I've downloaded and modified this flow as per the instructions, I think. I'm getting an early error at the Apply to each Constituents from List section.
"Action 'Condition' failed: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'length' expects one parameter: an array or a string the length of which is returned. The function was invoked with '0' parameters. Please see https://aka.ms/logicexpressions#length for usage details.'."
I'm not able to pull up value. I have to choose body/value in the Apply to each step, so I'm not sure what that is about. It is probably causing the error.
0 -
@Sean Pflueger - Hi Sean, I know you tagged Alex here but I thought I would start asking some questions. All I see in what you posted is a List Constituents action. Are you trying to add a custom field to those people? Do you need to check to see if they have the custom field already?
It's hard to tell where it is failing. I think it might be looking at the count of constituents that are returned. Can you put in the length as it is?
0 -
@Sean Pflueger
Apply to each is 99% of the time not the reason for failure. The “new view” is really bad at guiding you to see where the real issue is for troubleshooting.From your error message, it is telling you that the problem is in the Condition action within the Apply to each, where the Condition action is using an expression length() which is failing b/c it was not provided an array or string to get the length of, you provided nothing (meaning, your expression is length() only, instead of length(dynamic_content_of_array).
Show screenshot of the Edit mode and run mode of the Condition action in OLD view (not new view).
1 -
@Torie Wright Thanks so much for sharing this flow
Worked like a charm. I'm using it to keep records created by the system (event registrations) to end up in other flows when I'm just going to merge and delete the records anyway!
0 -
@Carol Grant
I'm trying to add an Attribute on to records that do not have one if they land on the Donor list I've created. These are all new records, so they shouldn't have one.0 -
@Sean Pflueger
As I suspect, your length() expression on the left side of the compare does not have any parameter passed in to check the length of.You will need to click on the length() dynamic content, and it should pull up the Expression editor.
click inside the paranthesis:
and then select the “value” dynamic content that is from the list constituent action.
HOWEVER,
From looking at your screenshots, your flow is in a mess with too many “for each”. From the screenshots, it looks like the flow is doing:- get constituent list
- apply to each constituent
- list the constituent custom fields
- Another “for each” which I can only assume you are “looping each constituent custom fields”?
- filter array, i don't know what you are filtering
- condition
- length() is equals to 0? (screenshot is blurry, so i can't see if it's 0 or 8
- if yes
- another for each - i can only assume this is looping constituent again…
- create constituent attribute/custom field
- another for each - i can only assume this is looping constituent again…
- if no
- nothing
- if yes
- length() is equals to 0? (screenshot is blurry, so i can't see if it's 0 or 8
you have way too many “apply to each/for each” loop that is not needed but will cause your flow to run for way too long even if you corrected the error mentioned above. If I understand your intention of the flow, all you need is:
- get constituent list
- apply to each constituent (for each constituent)
- create constituent custom field
0 -
@Alex Wong
Thank you. I simplified and took out a lot of the steps and it appears to be working. Thanks.0 -
@Sean Pflueger- it's still hard to see your screens but I think in the Condition you want to have the length of the filtered array which is explained in the posts below. Is this what you have in your condition?
length(body('Filter_array'))
Also, I think you need your condition inside your For each loop, it appears to be outside. If you still are having issues, join us tomorrow at the Power Automate group and we can help you. Email Erik Leaver to get on the agenda.
0 -
@Torie Wright
As I understand this flow will only add a custom attribute to a constituent if there is no custom attribute. Could I adapt this to also update a constituent attribute? ie donor lifetime giving is $900 so is given a custom field of "Supporter". Donor then donates $500 more which move the donor into a new giving segment. A list is pulled and and custom field updated to "Major Supporter".0 -
I think I will need to add some more flow to the False code. So if custom attribute is present then replace with xxx?
0 -
@Andrew Jupp
Answer is yes, you can add update logic.in the update logic path, you will need to supply the update custom field with the custom field system record id, which you can obtain from the filter array action for the custom field category
0
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