Output of gift of any constituent was between 365 and 372 days ago
Hi all,
I'm trying to create a query in Raiser's Edge NXT that produces an output where gift of any constituent was between 365 and 372 days ago. I need the result to be dynamic. Since there's not a feature in the Criteria section where I can write Between Today - 365 days and Today -372 days I'm finding it quite tricky. Since I need the result to be dynamic I can't use merge query. Tried also using Select from query in the Record processing feature.
Help please!
Many thanks!
Comments
-
@Robert BenjaminLaing
use Adhoc query via Query API. generate dynamically the date range via addDays() expression that will give you 365 days ago and 372 days ago dynamically, then use these 2 dates as criteria on gift date1 -
Hi Alex
thanks for all the help in my previous issue and this one too.
Could you confirm please that this JSON is correct. I have very little using/handling it and the JSON im running is returning a “bad request ” error even before putting in my Compose action outputs. Before the ad hoc query action the inputs for my compose and compose 1 actions were respectively "addDays(utcNow(), -365", 'yyyy-MM-dd')" and addDays(utcNow(), -372, 'yyyy-MM-dd') Please also note that I have added the criteria Total Amount of Gifts ≥ £1000. so my criteria is “Last Gift Date ” between (365 days ago and 372 days ago) AND Total Amount of Gifts ≥ £1000.
my JSON below:
{{
"query": {
"select_fields": [
{
"query_field": {
"id": 425,
"available_field_name": "Constituent ID",
"selected_field_name": "Constituent ID",
"value_type": "Text",
"one_to_many": false,
"output_sort_can_add_edit": true,
"criteria_can_add_edit": true,
"execute_by_id_supported": true,
"summary_has_available_fields": false,
"summary_has_default_filters": false
}
},
{
"query_field": {
"id": 424,
"available_field_name": "First Name",
"selected_field_name": "First Name",
"value_type": "Text",
"one_to_many": false,
"output_sort_can_add_edit": true,
"criteria_can_add_edit": true,
"execute_by_id_supported": true,
"summary_has_available_fields": false,
"summary_has_default_filters": false
}
},
{
"query_field": {
"id": 422,
"available_field_name": "Surname",
"selected_field_name": "Surname",
"value_type": "Text",
"one_to_many": false,
"output_sort_can_add_edit": true,
"criteria_can_add_edit": true,
"execute_by_id_supported": true,
"summary_has_available_fields": false,
"summary_has_default_filters": false
}
},
{
"query_field": {
"id": 68586,
"available_field_name": "Gift Date",
"selected_field_name": "Last Gift Date",
"value_type": "Date",
"one_to_many": false,
"output_sort_can_add_edit": true,
"criteria_can_add_edit": true,
"execute_by_id_supported": true,
"summary_has_available_fields": false,
"summary_has_default_filters": false
}
}
],
"filter_fields": [
{
"query_field": {
"id": 68586,
"available_field_name": "Gift Date",
"selected_field_name": "Gift Date",
"value_type": "Date",
"one_to_many": false,
"output_sort_can_add_edit": true,
"criteria_can_add_edit": true,
"execute_by_id_supported": true
},
"compare_type": "None",
"filter_values": [
"compose action output i insert ",
"compose 1 action output i insert "
],
"operator": "Between",
"left_parenthesis": false,
"right_parenthesis": false
},
{
"query_field": {
"id": 71937,
"available_field_name": "Total Amount of Gifts",
"selected_field_name": "Total Amount of Gifts",
"value_type": "Summary",
"one_to_many": true,
"output_sort_can_add_edit": true,
"criteria_can_add_edit": true,
"execute_by_id_supported": true,
"allowed_filter_operators": ["Equals", "DoesNotEqual", "RelativeComparisons", "OneOf"],
"summary_value_type": "Text",
"summary_has_available_fields": true,
"summary_has_default_filters": false
},
"compare_type": "None",
"filter_values": ["£1,000.00"],
"operator": "GreaterThanOrEqualTo",
"left_parenthesis": false,
"right_parenthesis": false,
"summary_instance": 1
}
],
"sort_fields": [
{
"query_field": {
"id": 71937,
"available_field_name": "Total Amount of Gifts",
"selected_field_name": "Total Amount of Gifts",
"value_type": "Summary",
"one_to_many": true,
"output_sort_can_add_edit": true,
"criteria_can_add_edit": true,
"execute_by_id_supported": true,
"allowed_filter_operators": ["Equals", "DoesNotEqual", "RelativeComparisons", "OneOf"],
"summary_value_type": "Text",
"summary_has_available_fields": true,
"summary_has_default_filters": false
},
"sort_order": "Ascending",
"summary_instance": 1
}
],
"gift_processing_options": {
"soft_credit_option": "Donor",
"matching_gift_credit_option": "Donor",
"use_gross_amount_for_covenants": false
},
"advanced_processing_options": {
"use_alternate_sql_code_table_fields": false,
"use_alternate_sql_multiple_attributes": false
}
}
}
0 -
@Robert BenjaminLaing
I don't know how you created the JSON, but it is definitely not correct, which is the reason for the bad request error.I think I answer you on another post already on what a good JSON for adhoc query request looks like.
0
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)
