Productive Computing, Inc. Support Forum

Plug-ins => FM Books Connector => Topic started by: Brent Barnhart on February 26, 2013, 05:35:08 PM

Title: TXNDATE, Error at TxnDate, Union doesn't support this value '0-00-00'
Post by: Brent Barnhart on February 26, 2013, 05:35:08 PM
I cannot figure out why my plugin just quit working.
It works 50% of the time, the other, I get the above error.

Error Posting Invoice   ~   CODE: -1000   ~   SEVERITY: failed validatn
MESSAGE: Error at TxnDate  ~  Reason:   Union doesn't support this value.  ~  The element 'TxnDate' with value '0-00-00' failed to parse.  ~  Field Value:   0-00-00  ~  <?xml version="1.0" encoding="ISO-8859-1" ?><?qbxml version="12.0" ?

I just got the newest FM Books Connector Plugin....I just Upgraded to QuickBooks 2013.....I just got Windows 8

I feel comfortable on all of the above, but I can't figure out the error. I have tried changing my date format going into FileMaker. I read that the date going into Quickbooks needs to be YYYY-MM-DD if that is true I will have to make up a new field and concatenate to the above form. But that wouldn't explain why some go through and transfer. Please help, days trying to figure this out. It has to be simple.
Title: Re: TXNDATE, Error at TxnDate, Union doesn't support this value '0-00-00'
Post by: Geoffrey Gerhard on February 26, 2013, 08:30:04 PM
Don't change your date format or create a calculated field value, just enclose your InvoiceTransactionDate field in the PCQB_SFormatString function with a qbType value of "DATETYPE". If you're not creating the InvoiceAdd Request in raw XML, it would look like this...

PCQB_RqAddFieldWithValue( "TxnDate" ; PCQB_SFormatString( Invoice::TxnDate ; "DATETYPE" ) )

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852
Title: Re: TXNDATE, Error at TxnDate, Union doesn't support this value '0-00-00'
Post by: markengelhardt on March 25, 2013, 08:24:42 PM
What am I missing?

This test works as I expect:

Set Variable [$x ; Value:PCQB_SFormatString (Date ( 2 ; 1 ; 2013 ) ; "DATETYPE" )]
   gives back: 2013-02-01 as expected.....

But the next test fails miserably. It looks like a BUG to me:

Set Variable [$x ; Value:PCQB_RqAddFieldWithValue( "TxnDateRangeFilter::FromTxnDate" ; PCQB_SFormatString (Date ( 2 ; 1 ; 2013 ) ; "DATETYPE" ))]
gives an error message with The element 'TxnDate' with value '2001-2013-02 ' failed to parse.
Title: Re: TXNDATE, Error at TxnDate, Union doesn't support this value '0-00-00'
Post by: Geoffrey Gerhard on March 26, 2013, 05:03:57 AM
Is FMP or QB localized for a non-US country? Your first "test" shows the expected result. Your second construction would not alter the date's format. Do you get the same error if you use "2013-02-01" in place of "PCQB_SFormatString (Date ( 2 ; 1 ; 2013 ) ; "DATETYPE" )"  ?

It may be a typo, but it's worth noting that the error message identifies the "TxnDate" element, not the "FromTxnDate" element used in the second argument you posted, as the source of the error.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852
Title: Re: TXNDATE, Error at TxnDate, Union doesn't support this value '0-00-00'
Post by: markengelhardt on March 26, 2013, 08:37:40 AM
Both Filemaker and Quickbooks are US versions.   Is there a way to view the output of PCQB_RqAddFieldWithValue directly?

M
Title: Re: TXNDATE, Error at TxnDate, Union doesn't support this value '0-00-00'
Post by: Geoffrey Gerhard on March 26, 2013, 09:00:12 AM
The plug-in converts its inputs into qbXML in the Request and parses the returned data from the qbXML Response. You can view the qbXML for either by using the PCQB_SGetXML( Type ; optPath ) function.

HTH!

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