Filtering a Retrieved NXT List
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
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 402 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 656 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 941 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 120 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 240 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) 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
- 796 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
