TEMPLATE ERROR: Unable to Display a Document

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

TEMPLATE ERROR: Unable to Display a Document

Post by Jaymer »

I searched and found this error going back to 2008, and yet I'm still plagued by it at 3 in the morning wasting my time.

TEMPLATE TYPE is TEXT

Here is my Process,
And the LOG that shows it found 3 records and executed the DISPLAY,
And the output of the DISPLAY DOCUMENT with my static text on it. No dynamic data because I had to remove my merge tags.
Screen Shot 2016-03-31 at 3.47.19 AM.png
Screen Shot 2016-03-31 at 3.47.19 AM.png (57.89 KiB) Viewed 10220 times
Now, I add a tag back in by Editing the Template (you can see the fieldname is correct as viewed in the background) and
Here is the error msg.
The log will look exactly the same.
WTF?
Screen Shot 2016-03-31 at 3.41.42 AM.png
Screen Shot 2016-03-31 at 3.41.42 AM.png (15.8 KiB) Viewed 10220 times
Screen Shot 2016-03-31 at 3.42.23 AM.png
Screen Shot 2016-03-31 at 3.42.23 AM.png (10.32 KiB) Viewed 10220 times
HELP!!!
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by Jaymer »

Added "IN BATCHES OF 1" just for someone who might suggest that.
No Joy. I don't want 3 separate documents anyway.

Here is the log.
This time, no error, but got nothing on the screen at all.
Screen Shot 2016-03-31 at 4.00.55 AM.png
Screen Shot 2016-03-31 at 4.00.55 AM.png (29.44 KiB) Viewed 10218 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

And now...

Post by Jaymer »

I've put it back to its simplest form.

Remove the find.
The process has ONLY the Display stmt.
The Template was changed to "ALL Instances of BO"

It now points to a file with 16 rows and it should output a value from each row.
Nope.
Same "Unable" error.

PS _ The timezone is off on this forum. Its actually 4am :x
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7535
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by aware_support »

Check out the output of the Aware IM Server (View button next to the Aware IM Server entry in the Control Panel) - this will have some diagnostics as to what's wrong. The rule log won't have it.
Aware IM Support Team
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by Jaymer »

here's the TOMCAT output.
IM Server said nothing except INFO about committed transactions.
I talked to Mark and he's having me change it to HTML template and to use a <LIST> action to embed a query. Am trying that.
Screen Shot 2016-03-31 at 7.01.12 PM.png
Screen Shot 2016-03-31 at 7.01.12 PM.png (95.21 KiB) Viewed 10191 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by Jaymer »

I changed this to HTML, and now its having problems unzipping the Imported Template.
Screen Shot 2016-03-31 at 8.01.19 PM.png
Screen Shot 2016-03-31 at 8.01.19 PM.png (19.68 KiB) Viewed 10185 times
Which, by the way is a pain to Import.
Clicking Import displays an Open File Dialog, which doesn't work correctly. Mine won't see files in the directory and doesn't let you use a wildcard to select file types.
**** I think you're using the SAVE AS "export" dialog box Incorrectly as the OPEN "Import" box also. Probably a typo.

I already tried HTML last night during my initial 2 hours messing with this, and then assumed I didn't have my template named correctly since no files were listed in the Open Dialog. I could not tell if AIM wanted "*.htm" or "*.html" files cause the FileTypes selector is broke. So I gave up on HTML and went back to text.
Later, somehow a bunch of files appeared only once, but now since I've made a HTML template and a bunch of new Templates (cause you cannot change the type once you create a template), no files ever show up in the Open Dialog to select. I have found a workaround that if I add a "\*" to the end of the path box, the first HTML it find intuit dir. will be selected as the template - even though a cryptic message box pops up saying I don't have rights to the MUSIC directory.
Screen Shot 2016-03-31 at 8.06.25 PM.png
Screen Shot 2016-03-31 at 8.06.25 PM.png (18.59 KiB) Viewed 10185 times
here's what \Documents looks like. There's no MUSIC directory in sight!
Screen Shot 2016-03-31 at 8.06.42 PM.png
Screen Shot 2016-03-31 at 8.06.42 PM.png (25.03 KiB) Viewed 10185 times
Here's what I think is happening...
If I click VIEW to view the template, it correctly opens my .html template in a browser.
But I don't think it imported it correctly and compressed it.
Which is why the inflator steps are failing. But i could be wrong. I think its related to the whole messed up way that I cannot import the Template correctly.
Its grabbing the filename somehow (cause the VIEW brings up the right file) but it can't unzip it at runtime cause its not really in there? dunno
Actually, I don't think thats it because the EXPORT is successfully creating an OUTPUT file of the original template.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7535
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by aware_support »

You don't need to use HTML - use text.

The error message that you are having is displayed if something is not right inside your tags in your template. Please double check that you are using tags correctly.
Aware IM Support Team
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by Jaymer »

I was trying to use TEXT as my first choice.
I cannot see any files to select.
Can you verify you are using the Open File Dialog Box correctly when Importing a Template?
Why does it refer to a Directory? instead of 1 file? ... in the Open box.
File Types are not available to select from.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by Jaymer »

aware_support wrote: Please double check that you are using tags correctly.
You can see in the 2nd picture at the top of the thread how I'm using the correct tag.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7535
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by aware_support »

If you have double checked ALL tags you are using please send us the BSV, so that we can check ourselves
Aware IM Support Team
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by Jaymer »

sent email. thx
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7535
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by aware_support »

The problem was in the settings for your text template. It had "All instances of the object" radio button selected. This is wrong. It should be "Determined at runtime"
Aware IM Support Team
Jaymer
Posts: 2494
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by Jaymer »

Vlad, thx for reply.
I hear what you're saying, but this isn't like I'm trying to send a letter to a person.
I only did that basic example to show a simple case.

I have a bunch of records in a BO, and I want to send those out to a text file.
Or I want to do an XML dump of transactions. I code my DTD (the template) and use <<tags>> for the merge fields. Voila! Should be simple.
I don't want to be on a form of a specific instance of the BO and click a button and have only 1 record get merged.
This would be a non-interactive process - at a scheduled time, dump whatever records meet a criteria (from this BIG file) out using the merge tags.

I've tried it many ways.
Its not like I want 10 statements to go out to customers as 10 different documents - or to MERGE them together.
I tried the process with a FIND ALL and then the DISPLAY,
I tried DISPLAY USING QUERY
I tried DETERMINED AT RUNTIME - though I thought that would bring up a picklist and let me select only 1 - I saw that happen once, maybe not from this option.

Basically, I want a DETAIL section of a report. No pagination. No headers/footers. Multiple records. But I can't use a graphic report cause I can't get a text file from that. I can't do an export cause I need formatted data, not just auto-generated CSV.
thx
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7535
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: TEMPLATE ERROR: Unable to Display a Document

Post by aware_support »

Then you need to ITERATE in your document over children of some parent object. This can only be achieved using one of the LIST_ functions that Aware IM supports - check them out in the User Guide. If they are not suitable, then you cannot do this with a document template and you need a plugin.
Aware IM Support Team
Post Reply