Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.Compose and .Browse

Status
Not open for further replies.

iwells

Programmer
Oct 2, 2012
284
CA
Last question of the week ...

In previous posts I've had it described to me that .Compose is similar to joins in that it combines the objects together and I'm trying to understand the implications of .Browse after .Compose:

mDBLinkCmpRW.OpenView "GL0001", vGLAMF
'i believe i need this and not GL0103
mDBLinkCmpRW.OpenView "GL0003", vGLFISC
mDBLinkCmpRW.OpenView "GL0012", vGLAVC

vGLFISC.Compose Array(vGLAMF, vGLAVC)

I believe at this point I've joined GLFISC, GLAMF and GLAVC together by the necessary keys so if I want records where vGLAVC.REVALSW = 0 AND vGLFISC.FSCSDSG = A can I do that by doing vGLFISC.Browse "FSCSDSG = ""A"" AND REVALSW = 0", True or do I have to vGLFISC.Browse "FSCSDSG = ""A""", True and then immediately vGLAVC.Browse "REVALSW = 0", True in 2 separate statements? Clearly this isn't working so I'm trying to determine if the first way I described doing it is correct or not.

 
.Compose is needed for adding records.

.Browse does each table separately, they're not like joins in that regard, you can't do a compound .Browse against a header and detail. Either use CS0120 and a regular SQL join, or do .Browse against each leg of the tree.
 
You believe wrongly with your statement above: "I believe at this point I've joined GLFISC, GLAMF and GLAVC together by the necessary keys".

Sage 300 Certified Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top