Filtering a Retrieved NXT List
Options
Since the retrieval options via the API and NXT lists builds are limited I am wondering how to filter the dataset retrieved within Power Platform. For example, I created an NXT list for a fundraiser for all of his open opportunities. I only want to send him a list of the subset of opportunities where the expected date is in the next week - I want this to be a daily email with a rolling week definition.
How can I best filter say the 20 items brought back by the list call to the few with that date scope?
I have tried a filter array step on the Blackbaud list retrieve step directly, I have tried initializing an empty array the then populating and then filtering the array, I have tried a for each append to an array based on a conditional control but nothing seems to work. In particular while the flow might run the filtering condition where ever applied does not actually seem to catch anything.
Thanks!!
Jana
How can I best filter say the 20 items brought back by the list call to the few with that date scope?
I have tried a filter array step on the Blackbaud list retrieve step directly, I have tried initializing an empty array the then populating and then filtering the array, I have tried a for each append to an array based on a conditional control but nothing seems to work. In particular while the flow might run the filtering condition where ever applied does not actually seem to catch anything.
Thanks!!
Jana
Tagged:
0
Comments
-
Hi Jana,
This should be possible using the Filter Array action. You can either accomplish this using two Filter Array actions, or you can do it in one Filter Array action if you use advanced mode.
Here's how it would look with two Filters:
The first filter looks at the Value from your List opportunities as the source. Then it looks for any items where the Expected date is greater or equal to utcNow().
The second filter looks at the Body from the output of the first Filter. Since we've already filtered out any items where the expected date is in the past, now we need to filter out items where the expected date is more than a week in the future. We do this by using an expression to get the date 7 days in the future. The expression looks like this: addDays(utcNow(),7)
When you want to use this data, make sure your using the output from the second filter, not the original List Opportunities action or the first Filter action.
Now, if you want to be a bit more efficient, you can apply both filters in a single action. You do this by using advanced mode. This is what it looks like:
The full expression is this:
@AND(lessOrEquals(item()?['expected_date'], addDays(utcNow(), 7)),greaterOrEquals(item()?['expected_date'], utcNow()))
That looks confusing for sure, but it's a little easier to make sense of if we use indentation:
@AND(lessOrEquals(item()?['expected_date'],addDays(utcNow(), 7)),greaterOrEquals(item()?['expected_date'],utcNow())
)2
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