AdHocQueryProcessReply -- Values shifted when Start and Limit included
When making an AdHocQueryProcessRequest to the appfxwebservice that includes a Start and Limit like so:
<AdHocQueryProcessRequest xmlns="Blackbaud.AppFx.WebService.API.1" AdHocQueryID="8d6b6163-faa3-48a4-8cc3-da4c716d851e" Start="0" Limit="20">
In the reply, the first output row value is dropped -- it appears that a row number has been inserted at the end (after the QUERYRECID, which is typically the last value returned). I say it's a row number because that value increments for each of the output rows.
Since the first output row value is dropped, the output values no longer align with the select fields -- for this particular query, the first select field is "Revenue Lookup ID" , however, the output value is now "Date".
<Rows>
<r>
<Values>
<v>2021-03-21T00:00:00</v>
<v>154.5000</v>
<v>California</v>
<v>95070-5241</v>
<v>8-54936864</v>
<v>Payment</v>
<v>Donation</v>
<v>Posted</v>
<v>False</v>
<v>11c12a52-0fb9-4f15-9176-6cda26e6b26b</v>
<v>1</v>
</Values>
</r>
<r>
<Values>
<v>2021-03-21T00:00:00</v>
<v>515.0000</v>
<v>California</v>
<v>95035-9068</v>
<v>8-40205916</v>
<v>Payment</v>
<v>Donation</v>
<v>Posted</v>
<v>False</v>
<v>e48904b9-b06a-44c9-a8fd-1ee0ec63d4c6</v>
<v>2</v>
</Values>
</r>
<Rows>
If the Start and Limit are not included, the output rows line up with the select fields - notice the Revenue Lookup ID is now the first Value and the "row number" at the end is no longer included
<Values>
<v>rev-44466076</v>
<v>2021-03-21T00:00:00</v>
<v>154.5000</v>
<v>California</v>
<v>95070-5241</v>
<v>8-54936864</v>
<v>Payment</v>
<v>Donation</v>
<v>Posted</v>
<v>False</v>
<v>11c12a52-0fb9-4f15-9176-6cda26e6b26b</v>
</Values>
Is there an alternative way to use paging? This seems to be an issue in hosted environments only, as I cannot reproduce it with a local instance of BBCRM.
<AdHocQueryProcessRequest xmlns="Blackbaud.AppFx.WebService.API.1" AdHocQueryID="8d6b6163-faa3-48a4-8cc3-da4c716d851e" Start="0" Limit="20">
In the reply, the first output row value is dropped -- it appears that a row number has been inserted at the end (after the QUERYRECID, which is typically the last value returned). I say it's a row number because that value increments for each of the output rows.
Since the first output row value is dropped, the output values no longer align with the select fields -- for this particular query, the first select field is "Revenue Lookup ID" , however, the output value is now "Date".
<Rows>
<r>
<Values>
<v>2021-03-21T00:00:00</v>
<v>154.5000</v>
<v>California</v>
<v>95070-5241</v>
<v>8-54936864</v>
<v>Payment</v>
<v>Donation</v>
<v>Posted</v>
<v>False</v>
<v>11c12a52-0fb9-4f15-9176-6cda26e6b26b</v>
<v>1</v>
</Values>
</r>
<r>
<Values>
<v>2021-03-21T00:00:00</v>
<v>515.0000</v>
<v>California</v>
<v>95035-9068</v>
<v>8-40205916</v>
<v>Payment</v>
<v>Donation</v>
<v>Posted</v>
<v>False</v>
<v>e48904b9-b06a-44c9-a8fd-1ee0ec63d4c6</v>
<v>2</v>
</Values>
</r>
<Rows>
If the Start and Limit are not included, the output rows line up with the select fields - notice the Revenue Lookup ID is now the first Value and the "row number" at the end is no longer included
<Values>
<v>rev-44466076</v>
<v>2021-03-21T00:00:00</v>
<v>154.5000</v>
<v>California</v>
<v>95070-5241</v>
<v>8-54936864</v>
<v>Payment</v>
<v>Donation</v>
<v>Posted</v>
<v>False</v>
<v>11c12a52-0fb9-4f15-9176-6cda26e6b26b</v>
</Values>
Is there an alternative way to use paging? This seems to be an issue in hosted environments only, as I cannot reproduce it with a local instance of BBCRM.
0
Comments
-
Hey Ben,
I don't think you need an alternate way of paging because part of the reply should be the <Fields> node. This contains the fields that are being returned and their order should correspond with the order of the <Values> node. If you modify your code to look at the values node and use the corresponding index value to pull the values you want order shouldn't really matter.
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 403 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.2K 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
- 940 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 249 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 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)