Ad-hoc query "Invalid Query Type"
I'm getting this error:
"title": "One or more validation errors occurred.",
"status": 400,
"detail": "Invalid query type.",
This is my query definition. Would someone please tell me what's wrong with it? (RE NXT).
Thank you!
Lisa.
{
"query": {
"select_fields": [
{
"query_field_id": 425
}
],
"filter_fields": [
{
"query_field_id": 130551,
"compare_type": "And",
"filter_values": [
"100000"
],
"operator": "GreaterThanOrEqualTo",
"left_parenthesis": false,
"right_parenthesis": false,
"summary_instance": 2
}
],
"sort_fields": [],
"type_id": 20,
"sql_generation_mode": "Query",
"gift_processing_options": {
"soft_credit_option": "Donor",
"matching_gift_credit_option": "MatchingGiftCompany",
"use_gross_amount_for_covenants": false
},
"advanced_processing_options": {
"use_alternate_sql_code_table_fields": false,
"use_alternate_sql_multiple_attributes": false
},
"suppress_duplicates": true,
"constituent_filters": {
"include_inactive": false,
"include_deceased": false,
"include_no_valid_addresses": true
}
},
"ux_mode": "Asynchronous",
"formatting_mode": "None"
}
Best Answer
-
Hi Alex, my pending query finally finished!
I will modify the order of the filters to see if it goes faster.
I don't have filter fields on the summary field because I just wanted the life time total gifts.
Thank you for all your help. Copying the json directly was what worked in the end.
0
Answers
-
query type id 20 is gift query, which doesn't have summary field.
summary field is usually constituent query and that's type 18.
So the question is, how did you "constructed" the query, did you copied from the webview query module "Copy JSON" button, and if you modified it somehow. What are you trying to query on?
1 -
Sorry Alex, you are right, I did have type 18, and changed it to 20 to see if it worked. It fails both ways. You're right about gift type 20 not having the summary field. Unfortunately that's not my issue. I put it back to type 18.
I did use the copy json button and modified it using your instructions from another post.
1 -
Alex I changed the filter to just have date (tried MM/DD/YYY and YYYY-MM-DD) to see if the summary field was causing trouble. I am still getting the error: (thank you)
{
"query": {
"select_fields": [
{
"query_field_id": 425
}
],
"filter_fields": [
{
"query_field_id": 68586,
"compare_type": "And",
"filter_values": [
"2026-05-01"
],
"operator": "GreaterThanOrEqualTo",
"left_parenthesis": false,
"right_parenthesis": false
}
],
"sort_fields": [],
"type_id": 18,
"sql_generation_mode": "Query",
"gift_processing_options": {
"soft_credit_option": "Donor",
"matching_gift_credit_option": "MatchingGiftCompany",
"use_gross_amount_for_covenants": false
},
"advanced_processing_options": {
"use_alternate_sql_code_table_fields": false,
"use_alternate_sql_multiple_attributes": false
},
"suppress_duplicates": true,
"constituent_filters": {
"include_inactive": false,
"include_deceased": false,
"include_no_valid_addresses": true
}
},
"ux_mode": "Asynchronous",
"formatting_mode": "None"
}
0 -
you have modified/removed more than you should.
I'm also not sure which post you were following, as there were some changes that made getting Query JSON definition easier directly from the query webview.
So my suggestion is, go to RE NXT query webview, and create the query (you don't need to save it) filter, output again, then in the Option tab, Copy JSON button.
1 -
This actually works but stays pending forever (if I copy the whole json in). I read somewhere that there is too much in this and you had to strip some of it out - use GET Query and change the IDs to _ID and encapsulate it in a Start and some end stuff. Which is what have tried.
I've started it running with the whole query json, but this will still be pending in a few days…
Any suggestions? Thank you for your time.
0 -
generally, "not one of" is more "taxing" on the querying, but should still not take days.
Pending status also means the job didn't even start the run yet.
Can you screenshot and paste the actions in PA flow?
Also, your query is using a summary field (total amount of gifts), which your summary_fields property is empty, that should not be the case. Are you sure the txt file you attached is directly from the Copy JSON in the query without any modification?
1
Categories
- All Categories
- 7 Blackbaud Agents for Good™
- New Raiser's Edge NXT Community
- 7 Blackbaud Community Help
- 214 bbcon®
- 1.4K Blackbaud Altru®
- 407 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.2K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 16 donorCentrics®
- 361 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 669 Blackbaud Grantmaking™
- 591 Blackbaud Education Management Solutions for Higher Education
- 3.3K Blackbaud Education Management Solutions for K-12 Schools
- 950 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 85 JustGiving® from Blackbaud®
- 6.9K Blackbaud Raiser's Edge NXT®
- 3.9K SKY Developer
- 252 ResearchPoint™
- 121 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 245 Member Lounge (Just for Fun)
- 38 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Closed) 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
- 813 Community News
- 3K Jobs Board
- 57 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)



