Word Merge -- using <<next record>> ?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Word Merge -- using <<next record>> ?

Post by tford »

Using Word Merge, there is <<Next Record>> indicator that will allow multiple instances of 1 BO to show on 1 Word Doc. For example,

<<FirstName>> <<Last Name>>
<<Address>>
<<City>>, <<State>> <<Zip>>

<<Next Record>>

<<FirstName>> <<Last Name>>
<<Address>>
<<City>>, <<State>> <<Zip>>

<<Next Record>>


etc - could be used to do Mail Merge mailing labels in 1 Word merge document.

Is there any way to accomplish the <<Next Record>> functionality within an AwareIM Word template? I have a number of different Word Mail Merge docs that I'd like to use within AwareIM.

Even though <<Next Record>> functionality is not in the documentation, I did a quick test & could not get it to work.

Thanks!
Tom
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

In Aware IM this is controlled outside of the template, so there is no need for Next Record. The idea is that if you have multiple instances of the object in the context and an operation that applies to the object, the operation will be applied to all instances.

Therefore, you just need to place the required instances in the context first and then generate the document, which will be created for each instance individually. You could do it with a process like this:

FIND Customer WHERE ...
PRINT DOCUMENT CustomerLetter

Have a look at the overdue loan processing in the Library application. You can find more details in the User Guide on applying operations to multiple object instances.
Aware IM Support Team
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

You can also use a pre-existing Word template (to print labels, etc.) outside of Aware IM by selecting a text file as a data source for the template. This is a part of the mail merge procedure in Word.

You would need to generate the text file with the data taken from Aware IM. This can be done in Aware IM with a document template of type Text. The text template (called, say, CustomerLabelList) would have a header line and a single tag with LIST function in it, for example:


FirstName,LastName,Address,City,State,Zip
<<LIST('FIND Customer WHERE ...', ',', 'FirstName', 'LastName', 'Address', 'City', 'State', 'Zip')>>


You could then generate a text file from this template in Aware IM with an action like this:

DISPLAY DOCUMENT CustomerLabelList

and save it to disk. Now you can open the Word document with the labels template and perform mail merge selecting the Aware IM - generated file as the data source.
Aware IM Support Team
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Thanks for your quick reply :D -- even on a weekend.

1- Library example. I don't think the library overdue loan example "fits" my example. In the library example, there is 1 letter produced for each instance of the BO in context.

In my Word template, I need 1 Word doc with each instance of the BO appearing on a new line (or group of lines) until it the Word template hits a <<next record>> indicator. With the use of <<next record>> indicators, Word templates operate more like bands of a report as described on pg 93-96 of v2.3 of the User Guide.

2- Text file example - I could not get the example to work -- not sure why. Untimately I don't think that is a good solution for my users because it involves too many steps & jumping outside of AwareIM.


It looks like to achieve similar functionality [multiple instances of 1 BO on 1 Word template document] within AwareIM, I will need to convert my Word templates to Reports.

Wish list: Down the road, maybe you could support the <<next record>> functionality --- maybe calling it <<next instance>> instead. Then a user could easily convert the Word templates for AwareIM use while changing only 1 word.

If I'm missing anything in my analysis, please let me know.

Thanks,
Tom
Bryan
Posts: 195
Joined: Fri Apr 03, 2009 12:46 am
Location: Cincy

Post by Bryan »

Tom,
Did you ever find a way to do this. I am trying to do something very similar. I have a word template that is the layout for Avery Mailing labels format 5160 and I would like to be able to file out the labels (30 of them per sheet) with the address of a different BO for each label.

Thanks
-Bryan
Version 8 (Build 2358)
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Hi Bryan,

Have you checkout out this forum post about Avery labels:
http://www.awareim.com/forum/viewtopic.php?t=3046
Tom - V8.8 build 3137 - MySql / PostGres
Post Reply