Sorting Results in "List Actions All Constituents" API Call
I’m using the List Actions All Constituents API call in RE NXT to retrieve a specific action list. My goal is to:
- Sort results by
date_added(newest to oldest). - Limit the output to the first 15 results.
I know I could use the native connector List Actions action or run an ad hoc query for similar results, but the 15 record limit is why I’m leaning toward the API call, if I can figure out the sort_token query parameter.
Has anyone successfully done this? Any guidance would be greatly appreciated.
Best Answer
-
Love when I make a post… and then end up figuring out the answer myself! 😁
Didn't figure out how to sort within the HTTP API call - looks like
sort_tokenis related to something else. Ended up utilizing a nested expression to sort the array output from the Parse JSON action in reverse order (descending) by action date and grabbing the first 15 within the sorted array. Sharing incase anyone else can use this solution too.take(reverse(sort(body('Parse_JSON')?['value'], 'date')), 15)3
Answers
-
Unfortunately limit # of output rows is only available for static query, otherwise, I would say use Query API is best, so you are not being sent too much data (potentially).
Great job on the use of all the expressions. Sort is especially nice, only issue is, it can only work on simple data type.
1 -
Great point. Since I already was using an Action List (using filters there, not from a static query) I stuck with that route. Learned a new expression in the process, by way of ChatGPT - take().
1
Categories
- All Categories
- 6 Blackbaud Community Help
- 206 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 357 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 561 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.6K SKY Developer
- 242 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 778 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
