Author Topic: List of disallowed words  (Read 1411 times)

hudi42

  • Member
  • *
  • Posts: 8
List of disallowed words
« on: April 18, 2014, 01:58:20 PM »
Hi,

I ran into something today and am hoping there is an easy answer to this.

While pushing a customer with titled "Bogus Company inc, and it's affiliates" the error checker script threw an error. I changed the name taking out the comma 'and it's' and it worked.

Is there a list of words that are not allowed to be used? That way I can warn users about those words before they try to push.

Many thanks

Chris Turner

  • Administrator
  • Member
  • *****
  • Posts: 28
    • Productive Computing, Inc.
Re: List of disallowed words
« Reply #1 on: April 18, 2014, 02:11:59 PM »
Hi hudi42,

It could be the inclusion of the apostrophe ' character that was causing the error. Due to the nature of the plug-in's use of qbXML, certain characters (such as ", ', accents, or other non-ASCII characters) will cause erroneous results when executing a request. You would need to use HTML encoding to convert the characters into an acceptable format for the QuickBooks request processor to handle.

Another trick that might resolve the issue while keeping the text in place is to modify the preferences of your solution to disallow the use of "Smart Quotes". This is especially useful when working with single and double quotation marks, as the Smart Quote versions are different from the ASCII versions. Example: Smart Quote single-quote ( ʼ ) vs. ASCII single-quote ( ' ), or Smart Quote double-quote ( ˮ ) vs. ASCII double-quote ( " ).

You can disable Smart Quotes by navigating to File, then File Options..., then the Text section, and unchecking "Use smart quotes".
Chris Turner
Product Support Specialist
Productive Computing, Inc.

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 469
Re: List of disallowed words
« Reply #2 on: April 18, 2014, 03:52:09 PM »
I'm virtually certain it's the apostrophe character. The easiest way to solve the problem of text encoding is to wrap your field value in the PCQB_SFormatString function. To pass your FMP solution's TO::CompanyName field value to QB as the CompanyName element, you'd do this...

PCQB_RqAddFieldWithValue( "CompanyName" ; PCQB_SFormatString( TO::CompanyName ; "STRTYPE" ) )

...and all the escaping is done for you. So called "curly quotes" (single and double) will be converted to their web safe "straight quote" equivalents. The QB UI doesn't support the typographically superior "curly" versions. It also fixes ampersands and the "<" & ">" characters.

HTH!

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

hudi42

  • Member
  • *
  • Posts: 8
Re: List of disallowed words
« Reply #3 on: April 24, 2014, 12:22:50 PM »
Thank you both.

That function (PCQB_SFormatString) is what I'll use to get around this.