Word Merge and Store

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Word Merge and Store

Post by denisv »

I want to be able to merge to a template and store the merged letter as well, (single instance). The How To details say to define the attribute type to Document and as the initial value use the document template. It then says when you create an instance of that business object it will automatically store the merged document in thay business object and can be viewed later.

It does create an instance with the document but does not merge the data.

Note: the template itself works if you just use a standard Create Document process.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

denisv,

I have this working in a sample bsv. If you would like to see it, just PM me your email address.

Tom
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

THanks for supplying the sample Doc bsv.

I think I have this working as you had indicated. One think I was wondering, if you edit the document from the created business object, is there anyway to update it in the database without having to save it our and add it back in again ?

I am using a process to create the document, but there could be up to 10 possible 'templates' to use. I am going to try and see if I can define the document to be used as part of the process.
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

I have a work around which isn't ideal, but maybe the only way?

I created a business object for each document template type I use with the initial value of the Document Attribute of the template in question.

I then added them all into the same Business Object Group.

I now have a process for each template type which creates the correct template/business object, adds linked to the main business object using the Business Object Group. It's a bit messy.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

denisv,

Are you looking for a way to update the Document with the latest info from a BO attribute?

For example, you have a Document attibute which is initialized by a Template called CollectionLetter and the Address info in the BO changes, would you like the collection letter to reflect the updated address?

Tom
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

Hi Tom,

No what I want is that when the merge is performed, the user can see the letter before printing and make any local changes at that point, print and save back into the Business Object. I am not looking for any of the data values originally extracted from the business object to be updated in the letter if they subsequently change in the business object. Neither am I looking for the original template to be altered.

It is really a case where the user might want to add / alter some of teh generic text from the template. Or even have a template with no generic paragraph text that when it is merged and opened, then the user can 'compose' the letter body thenselves, save back to the business object.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Denis,

I sounds like you need a BO with 2 attributes then. Let's say Customer.DocTemplate that will store the document created by the Template and Customer.DocFinal that will store the final edited document.

Does that sound like what you need?

Tom
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

denisv,
One think I was wondering, if you edit the document from the created business object, is there anyway to update it in the database without having to save it our and add it back in again ?
No -- you will have to save the edited doc locally and add it back into AwareIM.

Tom
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

Tom,

It's unfortunate that it can't be saved back as part of the process, maybe I'll see if it could be a wishlist item as it would be important from a document management side as well !.

Besides this I have made a significant change to how the documents can be merged which allows for only needing one business object and the user selecting the template they want. They will also be able to load subsequent templates themselves.

When I have a sample I will send to you.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

denisv,

I'm not sure how AwareIM could ever save back a changed document without the user saving it to their local hard drive, then pulling that saved doc back into AwareIM.

When the user is changing the Word doc, AwareIM has no control over the process. At that point, on MS Word file saving commands have any bearing.

I look forward to seeing a copy of your revised BSV.

Thanks,
Tom
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

I have changed the method here as follows:

a) Create one business object for Call
b) Create one business object for 'Letter', Attribute of Call
c) Create one business object for 'Templates', attribute of TemplateName
d) Letters should have an attribute for Templates
e) Letters should have an Text attribute, e.g. 'Info', and the Doc attribute
f) Add a rule to Letters on new for:

Copy Value from Letter.Templates.TemplateName to Letters.Info
Remove Templates from Letter.Templates (This allows you to display the template name used simply as a value for grid views)
Copy Value from Letter.Info to Letter.Doc (this creates the merged doc)

f) Have a Main Form for New showing the Letters.Template attribue as a drop down, not showing the Doc attribute or Info attribute
g) Have a View form for edit showing the Letter.Doc attribute and Letter.Info attribute

Create a process for ENTER NEW Letter
View Letter

The new rule on the BO ensures that the correct template is used when the Enter process is saved.

What I wanted to do then was allow users load their templates, add the template name into the Template BO so it would be available for selection. However, Aware must look in a different area for pre-loaded templates and user loaded templates.

Need to try and get around this.
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

Hi, can Aware assist:

I have this Business Space working where the user can select whatever word template they want to merge to from a business object (in context). (Single document not a merge across records)

Allowing users to load their own templates, I want to let them, in a similar way to the documents stored in the business space, choose the template and merge to on a specific business object (in context) and not from the manage template area which requires a query. Is this possible.

I have at present a process for documents stored in the BSV:

CREATE Correspondence WITH Correspondence.Correspondence=CallRecord
DISPLAY MESSAGE 'Document Created'

And a rule on the Correspondence Business Object of:

If Correspondence IS NEW Then
Correspondence.CallID=Correspondence.Correspondence.CallID
Correspondence.DateCreated=CURRENT_TIMESTAMP
Correspondence.UserCreated=LoggedInSystemUser.LoginName
Correspondence.Info=Correspondence.Template.Name
Correspondence.Doc=Correspondence.Info
REMOVE Template FROM Correspondence.Template
pixerp
Posts: 180
Joined: Sun Jan 28, 2007 7:12 pm

Post by pixerp »

Hi denisv,

Your requirement to be able to modify a document and save it back DIRECTLY into the DB is something I (and others) have asked long ago.

Finally I got a java extension developped which does it quite nicely. The trick is that both the server and the client must know where the temp file will be stored. Further, the code must take care for unique filenames (+ access rights,..) and the server is on the intranet.

From a user perspective, it comes to start a process "Create OutgoingLetter", select a Template as a dropdown in the form ( + subject, etc.).

In the OutgoingLetter form, the user can then click on :

Edit the document (HTML attr.: file:///<<OutgoingLetter.DocLetter>>)

When closing Word or OOwriter, just need to answer Save modifications.

Now, in the form the user can click on :

Save the document (as Operation invoked from the form).
This process does IMPORT DOCUMENT and obviously knows which one !

Regarding your question about the user being able to choose the template in the process, I solved it like you did with a DocTemplate BO where the template created in the Configuration tool needs to be referenced.
And of course, I would like the user to be able to import a template without the Configuration tool....

Tell me if you, and maybe others, are interested ...
Post Reply