Normal Topic Need help with variant of Alec's Merge example (Read 367 times)
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Need help with variant of Alec's Merge example
Oct 11th, 2005 at 10:23pm
Print Post Print Post  
Hi all,

Wondering if someone can help me -- I'm using Alec's example of a mail merge, which is working great.  Now, I'm trying to include some addiitonal data from an XLookupSourceList (so I can look up a sales person's full name, title, extension, and email from their staff ID# over in my staff database).

How would I go about this?  The LEs for the form I'm in are recorded in c:\sesame\wordmrg\LEList.txt (which is the variable vNames)

The compilation of the body of the letter looks like ...

[code]For n = 1 to @CountStringArray(vNames)
     vHeader = vHeader + @AccessStringArray(vNames,n) + "^"
       vData  = vData + @(@AccessStringArray(vNames,n)) + "^"
[/code]

How can I 'insert' data from an xlookupsourcelist command, especially for alec's option to print on multiple records?

  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
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: Need help with variant of Alec's Merge example
Reply #1 - Oct 12th, 2005 at 5:39pm
Print Post Print Post  
Hello Blair,

This is just a thoery but I see no problem with it.

In that For loop put an If statement that checks to see in n is whatever number your ID# is. For example if vNames contains

First;Last;City;State;Zip;ID#

your If statement would check to see if n is 6. If it is then you do your XLookupSourceList based on the value in ID#. If there is no error, then parse the return value out and add the element names that you are retrieving to the vHeader string and add the values to vData.

-Ray
  

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