Thanks for great work by the AwareIM development team, beginning with build 1158 the process described above just became both easier & more powerful. Note that User Defined Documents (UDD) portion of this note applies only to the Developer's version of AwareIM. Many of the same concepts apply to static Word doc templates defined by a configurator in AwareIm.
Goal --to allow users to:
1) create their own Word docs (UDDs) using AwareIM attributes
2) use other UDD attributes to manage the UDD list (i.e. Categories)
3) select a UDD from a query listing all or selected UDD
4) Use a Query by Form to select which instances of a BO to merge with the UDD
5) Display the merged Word document as ONE Word doc to be printed or saved
UDDs aren't limited to the functionality described above. It's just the scenario I am documenting below to show the power of the combined new features:
1) Create a new UDD BO by clicking on Add User Defined Document Object
2) New BO: "Client" Attributes: Name & City
2) New query: "ClientsForMailMerge_UseForm" - Query of the Client BO with "Use Form" checked.
3) New process: "DisplayUDD_UsingClientForm"
a) Process input: UserDefDoc
b) Rule: DISPLAY DOCUMENT UserDefDoc.UDD_Name USING 'ClientsForMailMerge_UseForm' MERGE INTO ONE
4) New query: "UDD List"
a) Query of UserDefDoc. You can group/search by Category, etc if you add an attribute to the UserDefDoc BO.
b) Operation: "Create Word Doc" - this runs process created in #3 above
Now to use the BSV:
5) Create a Word doc that uses:
This is a sample letter
<<Client.Name>>
<<Client.City>>
6) Create a new instance of UserDefDoc and upload Word doc created in Controlled truncation of a data string above
7) Create several of instances of Client
8-)Run Query "UDD List" + Click on "Create Word Doc" operation
9) You will be presented with Query by Form to select which instances of Client you want to merge into the selected Word doc.
10) Click OK and ONE Word doc should appear with the selected instance of Client. You can now save this to a Word doc, print it locally or create a PDF.
I hope I got all the steps right.
Tom