Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Subform Listing (Read 2350 times)
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Subform Listing
Reply #15 - Apr 11th, 2011 at 8:25pm
Print Post Print Post  
Rick_R

There will be many Parents connected to many children (same children to many Parents).
  
Back to top
 
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Subform Listing
Reply #16 - Apr 11th, 2011 at 8:31pm
Print Post Print Post  
Hammer -

I've tried using the xResultSets as you suggested.  I'm making some progress, but i've run into a problem.  I'm trying to use the following programming:


#include "sbasic_include.sbas"

var vHandle as Int
var VNoOfRecords as Int
var vLoop as Int
var vRubber as string
var vLotNumber as string
var vExtension as string

vRubber = "EG-4501"


vHandle=@xResultSetSearch(@FN,"Mill Log!Mill Lot Numbers", SEARCH_MODE_AND, SEARCH_SYNTAX_QA, "!Material=vRubber..")

If(vHandle>-1)

{

     vNoOfRecords = @XResultSetTotal(vHandle)

writeLN("NoOfRecords: "+vNoOfRecords)

     For vLoop= 1 to vNoOfRecords
           xResultSetCurrentPosition(vHandle,vLoop)

           vRubber = @xResultSetValue(vHandle,"Material")
           vLotNumber = @xResultSetValue(vHandle,"LotNumber")
           vExtension= @xResultSetValue(vHandle,"Extension")

                 WriteLn(vRubber + "---" + vLotNumber+"-"+vExtension)
           Next

           xResultSetClose(vHandle)
}

Eventurally, i will replace the vRubber variable described above with data from a form element.  However, when i try to use a variable in the vHandle statement I don't get any hits in the search.  If I use "" or "EG.." I get a list but not the list I want.

I'm looking for material numbers EG-4501, but if I use either of the two above, I get every material (when i use "") or every EG material (when I use "EG..").

Is there something about using variables that I'm missing?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Subform Listing
Reply #17 - Apr 11th, 2011 at 8:44pm
Print Post Print Post  
Hello,

You are going to want to use something like

Code
Select All
vHandle=@xResultSetSearch(@FN,"Mill Log!Mill Lot Numbers", SEARCH_MODE_AND, SEARCH_SYNTAX_QA, "!Material=" + vRubber + "..")  



As you want to use the value that is in the variable named vRubber not the word vRubber.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Subform Listing
Reply #18 - Apr 11th, 2011 at 8:56pm
Print Post Print Post  
I'm trying to look through the file "Mill Lot Numbers" in the Materials element for all those that match the variable vRubber.  In this case, I've assigned that vRubber number "EG-4501".  There a five records in Mill Lot Numbers that have EG-4501 in the Materials element, so I'm trying to list them.

I eventually want to select all the Materials that match vRubber AND match a certain LotNumber, which will be a variable vLotNumber.

Am I heading in the right direction?

  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Subform Listing
Reply #19 - Apr 12th, 2011 at 5:58pm
Print Post Print Post  
Yes, you are heading in the right direction.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print