User Defined Documents

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
kklosson
Posts: 1649
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

User Defined Documents

Post by kklosson »

I've re-read the documentation and reviewed past forums. I guess I still don't get the UDD concept. I've set up functions for a user to upload a Word document. Embedded in the document is a tag, such as <<SomeObject.SomeAttribute>>. I have an action on a form that calls a process:

Pick From UserDefDoc Where...
DISPLAY DOCUMENT UserDefDoc.UDD_Template

Goes as planned but the document just displays the tags with as they were when uploaded.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: User Defined Documents

Post by tford »

We make extensive use of UDDs for merging with selected records.

Below is the query

Image

Image

The "Merge with students" operation called a process with the selected UDD as a Process Input.

The process is:
DISPLAY DOCUMENT UserDefDoc.UDD_Name USING 'Student Merge - Selected Students' MERGE INTO ONE


A very powerful and helpful tool!
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1649
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: User Defined Documents

Post by kklosson »

So I must use a query? It seems that if the document is not receiving the data, the <<...>> will just be gone. Why is it displaying the tags instead of replacing them?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: User Defined Documents

Post by tford »

Oops .. hit submit too quickly.

The query 'Student Merge - Selected Students' referred to in the DISPLAY DOCUMENT is:

FIND Student WHERE Student IN LoggedInRegularUser.Students_MailMerge ORDER BY Student.Name_Last,Student.Name_First


Note that in my case the user has selected a instances of the Student BO that they want to receive a certain letter & have inserted them into LoggedInRegularUser.Students_MailMerge
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1649
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: User Defined Documents

Post by kklosson »

I must have a fundamental misunderstanding. Here's what I want to do...

1. End user is able to configure a Word document with various tags
2. End user can create a User Defined Document and upload said document to the object
3. User can call the process enabling selection of one of the User Defined Documents
4. Document is created with tags replaced with with object attributes.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
kklosson
Posts: 1649
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: User Defined Documents

Post by kklosson »

For this exercise, I am running a trial version of AwareIM (Enterprise Edition) on a virtual machine. I see certain UDD aspects are missing. Perhaps this is my problem?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: User Defined Documents

Post by tford »

1. End user is able to configure a Word document with various tags
2. End user can create a User Defined Document and upload said document to the object
3. User can call the process enabling selection of one of the User Defined Documents
4. Document is created with tags replaced with with object attributes.
Re: #2 -- Correct assuming you mean upload to UserDefDoc BO

The one step I don't see in your process is putting in context the BO that is in the merge doc fields. In my case, the merge doc has various fields like <<Student.Name_First>> and <<Student.Name_Last>>.

I happen to use method of storing selected students in the LoggedInRegularUser, then the instances of Student are put into context for use in the UDD by the query "'Student Merge - Selected Students' in the process below

DISPLAY DOCUMENT UserDefDoc.UDD_Name USING 'Student Merge - Selected Students' MERGE INTO ONE


You don't have to use my method of putting Student into context, but you have to have some method of putting an instance of the BO you want to use in the merge doc into context.
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1649
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: User Defined Documents

Post by kklosson »

In my case I launch from the form object so the Object is in context.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: User Defined Documents

Post by tford »

Pick From UserDefDoc Where...
DISPLAY DOCUMENT UserDefDoc.UDD_Template
Have you tried UDD_Name instead of UDD_Template?
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1649
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: User Defined Documents

Post by kklosson »

It does not allow. I thought it was funny that the user guide said that but the configurator did not allow it. Need to move to Developer environment to give this a fair test.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: User Defined Documents

Post by tford »

From the User Guide:
Image

Sounds like you are on the right track.
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1649
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: User Defined Documents

Post by kklosson »

Yes. I thought you got developer edition when you download the trial.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
kklosson
Posts: 1649
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: User Defined Documents

Post by kklosson »

Okay, done this in the developer edition - exact same outcome. Can anyone shed some light on what I might be doing (or thinking) that is wrong?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

Re: User Defined Documents

Post by weblike »

Hi kklosson,

While ago I have struggled with this and I've cumulated kind of experience playing with documents (html, doc, docx, PDF's..converting, etc).
Here is a demo BSV which I hope could help you.

Steps to use it:

1. decompress zip file (contains the bsv and a MS Word document as template)
2. import BSV file
3. When going in test mode, the BSV will automatically create a folder on your pc -> C:\InvoicePath (without this folder, my method is not working)
4. In test mode: Create UDD Template (with Word document from #1)
5. Create Invoice
6. In Home query -> display invoice with process from right of the record

The bsv is not good looking (forms, queries, etc), but the processes are working (this is about here)...
There are other methods to accomplish this, but from my method is kind easy to integrate an external software to convert the .docx file in PDF or other format.

Hope this helps.
If I can be useful with further infos, please let me know...

Nice day.
Attachments
uddtest.zip
(48.29 KiB) Downloaded 561 times
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
hpl123
Posts: 2628
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: User Defined Documents

Post by hpl123 »

Nice share George, thanks :).
Henrik (V8 Developer Ed. - Windows)
Post Reply