Author Topic: PCQB_ZQuery with malformed xml in optSearchCriteria returns unexpected result  (Read 2041 times)

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 470
I was finding unexpected results from a PCQB_Zquery () function, and further investigation led to the discovery that I had a typo that was being ignored. The problem is likely due to the "Optional" nature of the optSearchCriteria parameter. Here's the function as called:

PCQB_ZQuery( ".//InvoiceRet/BalanceRemaining/text()" ; "Invoice" ; "<TxnID>" & InvoiceList::qbTxnID & "</TxnID" )

Note that it's missing the final ">" on the "</TxnID". The function ignored the optSearchCriteria entirely and returned the BalanceRemaining value of all Invoices instead of just the targeted invoice. I think the typo should have resulted in an FMBooks Connector "!!ERROR!!" result, and PCQB_SGetStatus should identify "malformed xml" as the source of the error.

I hope this is something that will be addressed in a future version of the plug-in. If not, I hope this post will help others who run into a similar problem.


Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC 28105
704) 814-6852
704) 814-6853 FAX

Chris

  • God
  • Member
  • *****
  • Posts: 83
Thanks for pointing out the error.  We will verify the behavior and include any fixes in the next release of the plug-in.

Chris