Author Topic: Class Query with sub accounts  (Read 2569 times)

scottj

  • Member
  • *
  • Posts: 7
Class Query with sub accounts
« on: June 20, 2013, 09:54:41 AM »
In QB the classes I need to import look like this

Oregon
      Admin & Overhead
      Fundraising
      Donations
Washington
      Admin & Overhead
      Fundraising
      Donations

I'm using PCQB_RsgetFirstFieldValue( "Name" ))   I think I need Oregon:Admin & Overhead, Oregon:Fundraising etc.

The result is
Oregon
Admin & Overhead
Fundraising
Donations
Washington
Admin & Overhead
Fundraising
  Donations

Thanks
Scott


Kitdcat

  • Member
  • *
  • Posts: 4
Re: Class Query with sub accounts
« Reply #1 on: June 20, 2013, 10:36:54 AM »
Hi Scott -

Are you using the ClassAdd in the Quickbook OSR?

http://dev.developer.intuit.com/qbSDK-current/OSR/OnscreenRef/index-QBFC.html

I believe ParentRef creates the sub accounts

FullName
FullName (along with ListID) is a way to identify a list object. The FullName is the name prefixed by the names of each ancestor, for example Jones:Kitchen:Cabinets. FullName values are not case-sensitive.

Kitdcat

  • Member
  • *
  • Posts: 4
Re: Class Query with sub accounts
« Reply #2 on: June 20, 2013, 10:58:29 AM »
Change PCQB_RsgetFirstFieldValue( "Name" ))  to PCQB_RsgetFirstFieldValue( "FullName" )) 

scottj

  • Member
  • *
  • Posts: 7
Re: Class Query with sub accounts
« Reply #3 on: June 20, 2013, 12:07:18 PM »

I had tried fullname instead of name.  I believe I got the same result.  I can't try it right now but will later today and let you know.

Thanks
Scott

scottj

  • Member
  • *
  • Posts: 7
Re: Class Query with sub accounts
« Reply #4 on: June 20, 2013, 12:36:39 PM »
I verified that "Fullname"  gives me the same result as "Name"


Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Class Query with sub accounts
« Reply #5 on: June 20, 2013, 01:42:03 PM »
Your subject line and the PCQB_Rs all suggest you're trying to pull data from QB. A Query Request will return the same value for Name and FullName ONLY when a Class has no Parent (Oregon, Washington in your sample data.) Kitdcat identified the model for the FullName value when there is one or more ancestors.

PCQB_RsgetFirstFieldValue( "FullName" ) will return...
Oregon
Oregon:Admin & Overhead
Oregon:Fundraising
...
Washington
Washington:Admin & Overhead
etc.

Note that the "&" character will be returned in its escaped version: "&"

If you're trying to Add these Class records to QB, you'll need to create Oregon first. The Name value is Oregon, no ParentRef. Then pass Admin & Overhead as the Name value of the next ClassAdd Request with a ParentRef:FullName value of Oregon.

HTH!

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

scottj

  • Member
  • *
  • Posts: 7
Re: Class Query with sub accounts
« Reply #6 on: June 20, 2013, 01:46:24 PM »
Thanks...I'll play with that tonight.   

scottj

  • Member
  • *
  • Posts: 7
Re: Class Query with sub accounts
« Reply #7 on: June 20, 2013, 05:03:30 PM »
I hate when I make stupid mistakes.  In all my projects I use namefirst, namelast and namefull.

Can't believe I was typeing in PCQB_RsgetFirstFieldValue( "NameFull" ) instead of PCQB_RsgetFirstFieldValue( "FullName" )

I really new at the QB integration so I did learn some things through this other then spelling the functions correctly!

Thanks
Scott