Query API Change Explanation needed

Hi,

https://community.blackbaud.com/blogs/69/9724

I would like to get a better understanding for what this means:

  • We now offer support for all attribute fields, static entry fields, and lookup fields.

Specifically, regarding attribute fields.

84cdad44adc13354038fc1e42b7e8c34-huge-im

Before this change, I have been able to run Query API on a saved query that criteira on a specific attribute's import id being not blank, and output that specific attribute's information. But could not do this through ad-hoc API call, since there is no “unique query field id” for each specific attribute's field.

It does not look like any change has happend in this regard where we are now able to run ad-hoc query on specific attribute, When I do get available field node: /query/querytypes/7/nodes/336/availablefields, I got:

125eaf2fe22aca8523017385806c8aa7-huge-im

Which you can see that even for different specific attribute (i.e. Appeal Affinity vs Appeal Chapter), they have the same field id for the same “property”. 225 for Description and 226 for Comments. It doesn't appear I can use this? or am I missing something here?

@Erik Leaver @Ben Wong @Anthony Gallo not sure who can get me a good explanation here, but thank you in advanced.

Comments

  • Just dug a little deeper into the documentation, it looks like I missed this:

    964b373c746675eb9f0f0ab3c6b55052-huge-im

    Very interesting, going to try this out and it is does what I think it does. I will be able to share on community for this.

  • Yup working like a charm.

    using the query field id in combination with unique id specific to each specific attribute makes ad-hoc querying possible now. Amazing!

    Thank you BB.

    {
    "select_fields": [
    {
    "query_field_id": 150,
    "user_alias": "parent_id"
    },
    {
    "query_field_id": 227,
    "unique_id": "644",
    "user_alias": "chap_impid"
    },
    {
    "query_field_id": 225,
    "unique_id": "644",
    "user_alias": "chap_value"
    }
    ],
    "filter_fields": [
    {
    "query_field_id": 227,
    "unique_id": "644",
    "compare_type": "None",
    "operator": "NotBlank",
    "left_parenthesis": false,
    "right_parenthesis": false
    }
    ],
    "sort_fields": [],
    "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
    },
    "type_id": 7,
    "format": "Dynamic",
    "suppress_duplicates": false,
    "constituent_filters": {
    "include_inactive": true,
    "include_deceased": true,
    "include_no_valid_addresses": true
    }
    }

Categories