Selecting Donors from Query
I'm trying to Select donors from a query instead of constituent lists. I'd successfully run this flow but it put my Custom Codes on some random records, so it isn't reading the Query I'm using. I experimented with a few different steps. My guesses have been wrong, so I'm putting it to the group.



Comments
-
@Sean Pflueger
I don't know what you mean by “put my custom codes on some random records”.from your screenshot, i can see you called “Start a query job” with a query id, then you did a “list constituents” follow by “apply to each” but I don't know what is in the apply to each.
If you are trying to run query via query api, you are not doing it correctly. There are a few templates on how to use Query API in template showcase. Start there to understand how to use Query API first. In a nutshell.
- start a query job
- use dynamic content from #1 which is the JOB ID, get job status
- if job didn't finish yet, wait 30 seconds (or more) and get job status again
- when job status return sas_uri, which is the download link to the query job output, you can use it to download
- only after you download, you have access to the data of constituent to do what you want with them
2 -
Are you saying I can't take the Ids of the constituents from the query and use an apply to each to apply a Custom Code? I don't need a download step. I'm trying to do pure automation.
When I say I it applied Custom Codes to random Ids, I mean that the flow applied 500 Custom Fields and none of them were to any of the 28 records that were in my Query.
1 -
@Sean Pflueger - You can, but you need to follow Alex's steps 1-5 in his response – that will get you the output of your query to then use in the actual automation. It's one of those things that aligns with the motto of Power Automate - “it will take more steps than you think it should”.
1 -
@Sean Pflueger
you have a big misunderstanding.Constituent List SKY API execute and download the list of constituent in ONE power automate flow action. You don't “realize” a download, but the action does it, without the download, you don't get any data to work with, no ID, nothing.
Query API works differently, you request a query to be execute is only ONE action, then you need another action (in a loop) to check if the query execution is complete, then finally download the result in another action, from this last action is where you get the ID (and any other info you defined in the query execution).
Once you have a list of ID (from List Constituent action or download query output action), you can then use apply to each ID and do something to it.
I downloaded and import the flow zip file you included, inside your Apply to each, you have a create a constituent custom fields 2 action to create a constituent custom field for the constituent record identified by the ID field of the array returned downloaded" from the List constituents action. This should work to add the custom field each of the constituent in your List constituents action. The only thing is, the custom field you are trying to add (Donor Flow) is unique (meaning you can only have ONE per constituent) will fail if the constituent already have this custom field.
Your statement “When I say it applied Custom Code (field) to random IDs…” does not make sense unless you made change to the flow that is different than what I saw in your zip file. You should look at the flow's run history (it sounds like you ran it once at least so you can check) and see what happen to the Create a constituent custom field 2 action inside the Apply to each, maybe post that to get additional help
1 -
@Austen Brown It takes more steps than you think it should. I hadn't heard that, but that is exactly what I'm thinking.
0 -
@Alex Wong Thank you! I'll work on these instructions this week.
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