Error when pulling package information
On my gift digest, I would like to show the package id. Since every gift does not include a package, I am getting this error:
Unable to process template language expressions for action 'Condition_2' at line '0' and column '0': 'The template language expression 'first(item()['gift_splits'])['package_id']' cannot be evaluated because property 'package_id' doesn't exist, available properties are 'id, amount, appeal_id, campaign_id, fund_id'. Please see https://aka.ms/logicexpressions for usage details.'.
I tried adding in a condition that if the “package id” was blank, but I still have the above error. This is because the package ID is not a field on gifts that don't include a package.
Anyone else figure out a good way to handle this?
Comments
-
Hey @Amanda Holt, instead of using a conditional to check if the property is blank, try using an expression with an If statement that checks to see if the property is empty. The way I have it set up below returns True if the property is empty or does not exist and false if it does (you may want to reverse those). Then you can use the output of the Compose in your conditional.
Caveat to this: we don't use that field so I just guessed on what the JSON object looks like. You'll have to construct the actual output for the package_id property.
0 -
@Matt Thacker. I tried that but can't seem to get it to work. Got the error:
Array elements can only be selected using an integer index
I think part of the problem is that sometimes the package ID is there and sometimes it is not.
For example, under “get a gift" here is the result for the first gift in the list:

But for the second gift, this is the result:

You can see the package ID is not always listed for a gift. It is only included if the package ID has a value.
Maybe this is unrelated to the error I receive, but it certainly is complicating the flow to account for the difference.
0 -
@Amanda Holt, does your expression look like this? I didn't realize you were accessing a property in the Gift Splits property. You need to use an array index to access the properties within Gift Splits.
if(empty(outputs('Get_a_gift')?['body']?['gift_splits'][0]?['package_id']), false, true)
2 -
@Matt Thacker. That seemed to do the trick. I had used a similar expression but it wasn't working. Thanks so much for the help!
0
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®
- 655 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 939 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)
